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); }; }
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); } }
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); }; }
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); } }
public void OnRemoveEventListener() { A3_RideProxy.getInstance().removeEventListener(( int )S2Cenum.RIDE_UPGRADE, OnUpdateData); }
public void OnAddEventListener() { A3_RideProxy.getInstance().addEventListener(( int )S2Cenum.RIDE_UPGRADEGIFT, OnUpdateGiftData); }
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); }