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 Disable() { UIEffect.FadeOutPanel(panel); }