Menu
This commit is contained in:
parent
0afd388dfc
commit
2206e6f664
14 changed files with 5827 additions and 260 deletions
|
@ -1,5 +1,6 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using MyBox;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
@ -8,10 +9,15 @@ public class CanvasController : MonoBehaviour {
|
|||
|
||||
[SerializeField] Sprite[] orbCountdown;
|
||||
[SerializeField] Image orb;
|
||||
|
||||
[SerializeField] DOTweenAnimation effectTween;
|
||||
Image _effectImage;
|
||||
[SerializeField] Sprite[] effectSprites;
|
||||
|
||||
// Start is called before the first frame update
|
||||
[ButtonMethod]
|
||||
void Start() {
|
||||
_effectImage = effectTween.GetComponent<Image>();
|
||||
StartCoroutine(Countdown());
|
||||
}
|
||||
|
||||
|
@ -25,7 +31,9 @@ public class CanvasController : MonoBehaviour {
|
|||
orb.sprite = orbCountdown[i];
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
GameManager.instance.SelectRandomEffect();
|
||||
|
||||
_effectImage.sprite = effectSprites[(int)GameManager.instance.SelectRandomEffect() - 1];
|
||||
effectTween.DORestart();
|
||||
StartCoroutine(Countdown());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue