You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
42 lines
1.3 KiB
3 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using UnityEngine.UI;
|
||
|
using AX.MessageSystem;
|
||
|
|
||
|
public class PrePareIntercalate : MonoBehaviour {
|
||
|
private bool Flag = true;
|
||
|
private Animator Ani;
|
||
|
private Button IntercalateButton;
|
||
|
private GameObject TeamNameObj;
|
||
|
private GameObject WeatherObj;
|
||
|
// Use this for initialization
|
||
|
void Start () {
|
||
|
Ani = this.gameObject.GetComponent<Animator>();
|
||
|
IntercalateButton= this.gameObject.GetComponent<Button>();
|
||
|
IntercalateButton.onClick.AddListener(PressBtn);
|
||
|
TeamNameObj = transform.parent.transform.Find("TeamNameWin").gameObject;
|
||
|
WeatherObj = transform.parent.transform.Find("WeatherImage").gameObject;
|
||
|
}
|
||
|
public void PressBtn()
|
||
|
{
|
||
|
if (Flag)
|
||
|
{
|
||
|
Ani.CrossFade("IntarcalateShow", 0);
|
||
|
Flag = false;
|
||
|
}
|
||
|
|
||
|
else
|
||
|
{
|
||
|
Ani.CrossFade("IntarcalateClose", 0);
|
||
|
MessageDispatcher.SendMessage("CLOSE", (object)TeamNameObj.name, "CUBE");
|
||
|
MessageDispatcher.SendMessage("CLOSE", (object)WeatherObj.name, "CUBE");
|
||
|
MessageDispatcher.SendMessage("IntercalateButton", (object)this.name);
|
||
|
Flag = true;
|
||
|
}
|
||
|
}
|
||
|
// Update is called once per frame
|
||
|
void Update () {
|
||
|
|
||
|
}
|
||
|
}
|