Exemple #1
0
        public void Init()
        {
            ClickEventListener listener = ClickEventListener.Get(mStarIcon.gameObject);

            listener.SetClickEventHandler(OnStarClicked);
            mToggle.onValueChanged.AddListener(OnToggleValueChanged);
        }
Exemple #2
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)));
     }
 }
Exemple #3
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); });
     }
 }
Exemple #4
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)));
 }
Exemple #5
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);  //展开按钮点击事件
        }
Exemple #6
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);
        }
Exemple #7
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);
            }
        }
        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);
            }
        }
Exemple #9
0
        public void Init()
        {
            ClickEventListener listener = ClickEventListener.Get(mStarIcon.gameObject);

            listener.SetClickEventHandler(OnStarClicked);
        }
 public void Init()
 {
     ClickEventListener.Get(((Component)this.mStarIcon).get_gameObject()).SetClickEventHandler(new Action <GameObject>(this.OnStarClicked));
 }
 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)));
 }