123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- public class BattleReady : MonoBehaviour
- {
- public Text hostTxt;
- public Text guestTxt;
- public Text vsTxt;
- public Animator anim;
- private CallBackUtil.SimpleCallBack callBack;
- // Use this for initialization
- void Awake ()
- {
-
- }
-
- // Update is called once per frame
- private void Open ()
- {
- anim.Play ("BattleReady", 0, 0);
- }
- public void Ready()
- {
- if (callBack != null)
- {
- callBack();
- callBack = null;
- }
- }
- public void Close()
- {
- Destroy (this.gameObject);
- }
- public void Show(string host, string guest, CallBackUtil.SimpleCallBack callBack)
- {
- hostTxt.text = host;
- guestTxt.text = guest;
- this.callBack = callBack;
- Open();
- }
- }
|