// Use this for initialization void Start() { GameObject obj = GameObject.Find("TestPanel"); if(obj != null) m_testPanel = obj.GetComponent<UITestPanel>(); obj = GameObject.Find("TitlePanel"); if (obj != null) m_titlePanel = obj.GetComponent<UITitlePanel>(); ShowTestPanel(false); }
// Use this for initialization void Start() { GameObject obj = GameObject.Find("TestPanel"); if (obj != null) { m_testPanel = obj.GetComponent <UITestPanel>(); } obj = GameObject.Find("TitlePanel"); if (obj != null) { m_titlePanel = obj.GetComponent <UITitlePanel>(); } ShowTestPanel(false); }
void Awake() { Instance = this; Button_Start.onClick.RemoveAllListeners(); Button_Start.onClick.AddListener(() => { GameManager.Instance.StartGame(); }); Button_Continue.onClick.RemoveAllListeners(); Button_Continue.onClick.AddListener(() => { GameManager.Instance.ContinueGame(); }); Button_Over.onClick.RemoveAllListeners(); Button_Over.onClick.AddListener(() => { GameManager.Instance.EndGame(); }); }