コード例 #1
0
        public void OnAddOnClick()
        {
            new BaseButton(this.transform.FindChild("help_btn")).onClick = (GameObject go) => {
                helpcon.SetActive(true);
            };
            new BaseButton(helpcon.transform.FindChild("close")).onClick = (GameObject go) => {
                helpcon.SetActive(false);
            };

            _btn.onClick = (go) =>
            {
                if (_btn.interactable == false)
                {
                    return;
                }

                if (needNum > haveNum)
                {
                    Globle.err_output(-1104);
                    ArrayList data = new ArrayList();
                    data.Add(a3_BagModel.getInstance().getItemDataById(A3_RideModel.getInstance().GetUpGradeGiftItemId()));
                    data.Add(InterfaceMgr.RIDE_A3);
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ITEMLACK, data);
                    return;
                }
                _btn.interactable = false;

                A3_RideProxy.getInstance().SendC2S(3, "type", (uint)defaulSelect + 1);
            };
        }
コード例 #2
0
 private void OnBtnFeedHandle(GameObject go)
 {
     if (haveNum >= num && isAutoState == false)
     {
         A3_RideProxy.getInstance().SendC2S(2, "num", 1);
     }
     else
     {
         Globle.err_output(-1104);
         ArrayList data1 = new ArrayList();
         data1.Add(a3_BagModel.getInstance().getItemDataById(A3_RideModel.getInstance().GetUpGradeRideItemId()));
         data1.Add(InterfaceMgr.RIDE_A3);
         InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ITEMLACK, data1);
     }
 }
コード例 #3
0
        public void OnAddOnClick()
        {
            _btnLock.onClick = (go) => {
                int id = int.Parse(currGo.name);

                RideConfigVo vo = A3_RideModel.getInstance().GetValueByType <RideConfigVo>(id);

                int errCode = GetErrCode(vo.conditionLst);

                if (errCode < 0)
                {
                    Globle.err_output(errCode);

                    return;
                }

                if (vo.condition != -1)
                {
                    A3_RideProxy.getInstance().SendC2S((uint)id, 0);
                }
                else
                {
                    A3_RideProxy.getInstance().SendC2S(( uint )id, vo.conditionLst[0].type);
                }
            };

            _btnChange.onClick = (go) =>

            {
                A3_RideProxy.getInstance().SendC2S(5, "dress", ( uint )int.Parse(currGo.name));
            };

            new BaseButton(this.transform.FindChild("help_btn")).onClick = (GameObject go) => {
                helpcon.SetActive(true);
            };
            new BaseButton(helpcon.transform.FindChild("close")).onClick = (GameObject go) => {
                helpcon.SetActive(false);
            };
        }
コード例 #4
0
        private void OnBtnAutoFeedHandle(GameObject go)
        {
            if (haveNum > 0 && isAutoState == false)
            {
                isAutoState = true;

                var rideModel = A3_RideModel.getInstance();

                float maxCount = ((float)rideModel.maxExp - ( float )rideModel.GetRideInfo().exp) / (float)A3_RideModel.getInstance().eachExp;

                uint s2cCount = (uint)Math.Ceiling(maxCount);

                A3_RideProxy.getInstance().SendC2S(2, "num", s2cCount > (uint)haveNum ? ( uint )haveNum : s2cCount);
            }
            else
            {
                Globle.err_output(-1104);
                ArrayList data1 = new ArrayList();
                data1.Add(a3_BagModel.getInstance().getItemDataById(A3_RideModel.getInstance().GetUpGradeRideItemId()));
                data1.Add(InterfaceMgr.RIDE_A3);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ITEMLACK, data1);
            }
        }
コード例 #5
0
 public void OnRemoveEventListener()
 {
     A3_RideProxy.getInstance().removeEventListener(( int )S2Cenum.RIDE_UPGRADE, OnUpdateData);
 }
コード例 #6
0
 public void OnAddEventListener()
 {
     A3_RideProxy.getInstance().addEventListener(( int )S2Cenum.RIDE_UPGRADEGIFT, OnUpdateGiftData);
 }
コード例 #7
0
 public void OnRemoveEventListener()
 {
     A3_RideProxy.getInstance().removeEventListener(( int )S2Cenum.RIDE_ADD, OnUpdateData);
     A3_RideProxy.getInstance().removeEventListener(( int )S2Cenum.RIDE_CHANGE, OnUpDressState);
     A3_RideProxy.getInstance().removeEventListener(( int )S2Cenum.RIDE_LIMIT, OnUpdateLimit);
 }