Example #1
0
 public void Init()
 {
     for (int index1 = 0; index1 < this.mStarArray.Length; ++index1)
     {
         int index = index1;
         ClickEventListener.Get(((Component)this.mStarArray[index1]).get_gameObject()).SetClickEventHandler((Action <GameObject>)(obj => this.OnStarClicked(index)));
     }
 }
Example #2
0
 public void Init()
 {
     for (int i = 0; i < mStarArray.Length; ++i)
     {
         int index = i;
         ClickEventListener listener = ClickEventListener.Get(mStarArray[i].gameObject);
         listener.SetClickEventHandler(delegate(GameObject obj) { OnStarClicked(index); });
     }
 }
Example #3
0
        public static ClickEventListener Get(GameObject obj)
        {
            ClickEventListener clickEventListener = (ClickEventListener)obj.GetComponent <ClickEventListener>();

            if (Object.op_Equality((Object)clickEventListener, (Object)null))
            {
                clickEventListener = (ClickEventListener)obj.AddComponent <ClickEventListener>();
            }
            return(clickEventListener);
        }
Example #4
0
        public static ClickEventListener Get(GameObject obj)
        {
            ClickEventListener listener = obj.GetComponent <ClickEventListener>();

            if (listener == null)
            {
                listener = obj.AddComponent <ClickEventListener>();
            }
            return(listener);
        }
Example #5
0
 public void Init()
 {
     for (int index1 = 0; index1 < this.mStarArray.Length; ++index1)
     {
         int index = index1;
         ClickEventListener.Get(((Component)this.mStarArray[index1]).get_gameObject()).SetClickEventHandler((Action <GameObject>)(obj => this.OnStarClicked(index)));
     }
     // ISSUE: method pointer
     ((UnityEvent)this.mExpandBtn.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnExpandBtnClicked)));
 }
Example #6
0
        bool mIsExpand;                                                  //是否扩大
        public void Init()
        {
            for (int i = 0; i < mStarArray.Length; ++i)
            {
                int index = i;
                ClickEventListener listener = ClickEventListener.Get(mStarArray[i].gameObject);    //得到每一个星的点击事件
                listener.SetClickEventHandler(delegate(GameObject obj) { OnStarClicked(index); }); //添加星级点击
            }

            mExpandBtn.onClick.AddListener(OnExpandBtnClicked);  //展开按钮点击事件
        }
Example #7
0
        public void Init()
        {
            for (int i = 0; i < mStarArray.Length; ++i)
            {
                int index = i;
                ClickEventListener listener = ClickEventListener.Get(mStarArray[i].gameObject);
                listener.SetClickEventHandler(delegate(GameObject obj) { OnStarClicked(index); });
                Debug.Log(i);
            }

            mExpandBtn.onClick.AddListener(OnExpandBtnClicked);
        }
Example #8
0
        private void InitDots()
        {
            int childCount = this.mDotsRootObj.get_childCount();

            for (int index1 = 0; index1 < childCount; ++index1)
            {
                Transform child   = this.mDotsRootObj.GetChild(index1);
                DotElem   dotElem = new DotElem();
                dotElem.mDotElemRoot = ((Component)child).get_gameObject();
                dotElem.mDotSmall    = ((Component)child.Find("dotSmall")).get_gameObject();
                dotElem.mDotBig      = ((Component)child.Find("dotBig")).get_gameObject();
                ClickEventListener clickEventListener = ClickEventListener.Get(dotElem.mDotElemRoot);
                int index = index1;
                clickEventListener.SetClickEventHandler((Action <GameObject>)(obj => this.OnDotClicked(index)));
                this.mDotElemList.Add(dotElem);
            }
        }
Example #9
0
        void InitDots()
        {
            int childCount = mDotsRootObj.childCount;

            for (int i = 0; i < childCount; ++i)
            {
                Transform tf   = mDotsRootObj.GetChild(i);
                DotElem   elem = new DotElem();
                elem.mDotElemRoot = tf.gameObject;
                elem.mDotSmall    = tf.Find("dotSmall").gameObject;
                elem.mDotBig      = tf.Find("dotBig").gameObject;
                ClickEventListener listener = ClickEventListener.Get(elem.mDotElemRoot);
                int index = i;
                listener.SetClickEventHandler(delegate(GameObject obj) { OnDotClicked(index); });
                mDotElemList.Add(elem);
            }
        }
Example #10
0
        public void Init()
        {
            ClickEventListener listener = ClickEventListener.Get(mStarIcon.gameObject);

            listener.SetClickEventHandler(OnStarClicked);
        }
Example #11
0
 public void Init()
 {
     ClickEventListener.Get(((Component)this.mStarIcon).get_gameObject()).SetClickEventHandler(new Action <GameObject>(this.OnStarClicked));
 }
Example #12
0
 public void Init()
 {
     ClickEventListener.Get(((Component)this.mStarIcon).get_gameObject()).SetClickEventHandler(new Action <GameObject>(this.OnStarClicked));
     // ISSUE: method pointer
     ((UnityEvent <bool>) this.mToggle.onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(OnToggleValueChanged)));
 }