Exemplo n.º 1
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");
        }