Esempio n. 1
0
        public IEnumerator ShowAnimation()
        {
            bool turnEndInteractable = View.BattleView.TurnEndButton.interactable;

            View.BattleView.TurnEndButton.interactable = false;
            RectTransform firstObj = unitObjects[0];

            UIEffect.FadeOutPanel(firstObj.gameObject);
            unitObjects.Remove(firstObj);

            for (int i = 0; i < unitObjects.Count; i++)
            {
                StartCoroutine(MoveImagies(unitObjects[i], i));
            }

            yield return(new WaitForSeconds(0.8f));

            firstObj.anchoredPosition = Vector2.right * imageGap * (bufferSize - 1);
            unitObjects.Add(firstObj);

            List <Unit> unitBuffer = BattleManager.instance.UnitBuffer.ToList();

            unitObjects[0].GetComponent <Image>().sprite = BattleManager.instance.thisTurnUnit.Sprite;
            for (int i = 1; i < bufferSize; i++)
            {
                unitObjects[i].GetComponent <Image>().sprite = unitBuffer[i - 1].Sprite;
            }

            UIEffect.FadeInPanel(firstObj.gameObject);
            View.BattleView.TurnEndButton.interactable = turnEndInteractable;
        }
Esempio n. 2
0
 public void Init(int _bufferSize)
 {
     bufferSize = _bufferSize + 1;
     imageGap   = line.rect.width / bufferSize;
     for (int i = 0; i < bufferSize; i++)
     {
         RectTransform newObj = Instantiate(prefab, line);
         unitObjects.Add(newObj);
         newObj.anchoredPosition = new Vector2(i * imageGap, 0);
         UIEffect.FadeInPanel(newObj.gameObject);
     }
 }
Esempio n. 3
0
 public void Enable()
 {
     // blockPanel.SetActive(!Model.Tiles.DownStair.CheckPartyDownStair());
     UIEffect.FadeInPanel(panel);
 }
Esempio n. 4
0
 public void Enable()
 {
     UIEffect.FadeInPanel(panel);
 }