Esempio n. 1
0
        /// <summary>
        /// 注册函数,相当于Awake
        /// </summary>
        public override void Init()
        {
            base.Init();

            JBehaviourButton = UIUtility.BindClickEvent(Trans, "JBehaviourButton", OnClick);
            JUIButton        = UIUtility.BindClickEvent(Trans, "JUIButton", OnClick);
            JSaverButton     = UIUtility.BindClickEvent(Trans, "JSaverButton", OnClick);
        }
Esempio n. 2
0
        public override void Init()
        {
            base.Init();

            btn_Back = UIUtility.BindClickEvent(Trans, "Back", OnClick);

            double_button = UIUtility.BindDoubleClickEvent(Trans, "DoubleButton", OnClick);

            drag_buttion = UIUtility.Control("DragButton", m_gameobj);
            drag_Rect    = drag_buttion.GetComponent <RectTransform>();

            UIUtility.BindDragBeginEvent(drag_buttion, OnDragBeginEvent);
            UIUtility.BindDragEvent(drag_buttion, OnDragEvent);
            UIUtility.BindDragEndEvent(drag_buttion, OnDragEndEvent);

            button_text = UIUtility.GetComponent <Text>(drag_Rect, "Text");
            double_text = UIUtility.GetComponent <Text>(double_button.GetComponent <RectTransform>(), "Text");
        }
Esempio n. 3
0
        public override void Init()
        {
            base.Init();

            btn_Back = UIUtility.BindClickEvent(Trans, "Back", OnClick);
        }
Esempio n. 4
0
 public override void Init()
 {
     JResource.LoadResAsync <GameObject>("UI Root.prefab", (obj) => { _rootPrefab = obj; }, JResource.MatchMode.Prefab);
     UIUtility.BindClickEvent(btn_JumpTo, OnJumpToDemo);
     GameObject.DontDestroyOnLoad(gameObject);
 }