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; }
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); } }
public void Enable() { // blockPanel.SetActive(!Model.Tiles.DownStair.CheckPartyDownStair()); UIEffect.FadeInPanel(panel); }
public void Enable() { UIEffect.FadeInPanel(panel); }