BattleInfo.cs 412 B

1234567891011121314151617181920
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using System.Collections;
  4. public class BattleInfo : MonoBehaviour {
  5. public Animator animator;
  6. public Text infoTxt;
  7. public Text comboTxt;
  8. public void Show(string info, string combo="", bool isAlly=true)
  9. {
  10. infoTxt.text = info;
  11. comboTxt.text = combo;
  12. if(isAlly)
  13. animator.Play("BattleInfoBlue", 0, 0);
  14. else
  15. animator.Play("BattleInfoRed", 0, 0);
  16. }
  17. }