コード例 #1
0
        public override void setObj(GameObject obj)
        {
            base.setObj(obj);

            UIUtility.BindDragBeginEvent(m_gameobj, OnBeginDrag);
            UIUtility.BindDragEvent(m_gameobj, OnDrag);
            UIUtility.BindDragEvent(m_gameobj, OnEndDrag);
        }
コード例 #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");
        }