Пример #1
0
        /// <summary>
        /// Unity Method
        /// </summary>
        void Start()
        {
            UIFrame.Instance.homePage_btn.GetComponent <Button>().onClick.AddListener(() =>
            {
                MessageCenter.SendEvent(new Message((ushort)UIFrame.CommonEvent.homePage, panel1));
            });
            GameObject.Find("GameMain/Canvas/UIPanels/p1/Button").SetClick((g) =>
            {
                UIFrame.Instance.Open(panel2);
            });
            GameObject.Find("GameMain/Canvas/UIPanels/p1/Button (1)").SetClick((g) =>
            {
                UIFrame.Instance.Open(panel3);
            });
            GameObject.Find("GameMain/Canvas/UIPanels/p1/Button (2)").SetClick((g) =>
            {
                UIFrame.Instance.Open(panel4);
            });
            GameObject.Find("GameMain/Canvas/UIPanels/p1/Button (3)").SetClick((g) =>
            {
                UIFrame.Instance.Open(panel5);
            });
            GameObject.Find("GameMain/Canvas/UIPanels/p2/Button").SetClick((g) =>
            {
                UIFrame.Instance.Open(panel6);
            });
            GameObject.Find("GameMain/Canvas/UIPanels").transform.Find("p2/Button (1)").gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel7);
            });
            GameObject.Find("GameMain/Canvas/UIPanels/p2/Button (2)").SetClick((g) =>
            {
                UIFrame.Instance.Open(panel8);
            });
            GameObject.Find("GameMain/Canvas/UIPanels/p2/Button (3)").SetClick((g) =>
            {
                UIFrame.Instance.Open(panel9);
            });
            panel3.GetComponentInChildren <Button>().gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel4);
            });

            panel4.GetComponentInChildren <Button>().gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel5);
            });
            panel5.GetComponentInChildren <Button>().gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel1);
            });
            panel6.GetComponentInChildren <Button>().gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel7);
            });

            panel7.GetComponentInChildren <Button>().gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel8);
            });
            panel8.GetComponentInChildren <Button>().gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel9);
            });
            panel9.GetComponentInChildren <Button>().gameObject.SetClick((g) =>
            {
                UIFrame.Instance.Open(panel2);
            });


            UIFrame.Instance.Open(panel1);
        }
Пример #2
0
 public static void Unregister(this IProcessEvent processEvent, ushort id)
 {
     MessageCenter.UnregisterEvent(id, processEvent);
 }