Exemplo n.º 1
0
 //回收
 public static void SendOrnamentalRecycle(CSOrnamentalRecycle csOrnamentalRecycle, Action <SCEmptyOrnamentalRecycle> ResponseSCEmptyOrnamentalRecycleCallBack)
 {
     if (StaticData.IsUsedLocalDataNotServer)
     {
         SCEmptyOrnamentalRecycle scEmptyOrnamentalRecycle = new SCEmptyOrnamentalRecycle();
         ResponseSCEmptyOrnamentalRecycleCallBack(scEmptyOrnamentalRecycle);
     }
     else
     {
         ProtocalManager.Instance().SendCSOrnamentalRecycle(csOrnamentalRecycle, ResponseSCEmptyOrnamentalRecycleCallBack, (error) => { }, false);
     }
 }
Exemplo n.º 2
0
    private void OnButtonRebackClick()
    {
        CSOrnamentalRecycle csOrnamentalRecycle = new CSOrnamentalRecycle()
        {
            SoilId = currClickDecorateComponent.SoilId
        };

        ManorProtocalHelper.SendOrnamentalRecycle(csOrnamentalRecycle, (succ) =>
        {
            //更新仓库装饰物
            StaticData.UpdateWareHouseItem(currClickDecorateComponent.CropGoodId, 1);
            //回收完更新装饰物界面
            UIManorComponent uiManorComponent = UIComponent.GetComponentHaveExist <UIManorComponent>(UIType.UIManor);
            uiManorComponent.RefreshDecorateList();

            //回收装饰物之前关闭提示,否则会把这个提示删掉
            TipsTileComponent._instance.CloseAll();
            Destroy(currClickDecorateComponent.gameObject);
            goReback.SetActive(false);
            goRebackAndRotate.SetActive(false);
        });
    }
Exemplo n.º 3
0
        public void SendCSOrnamentalRecycle(CSOrnamentalRecycle csornamentalrecycle, Action <SCEmptyOrnamentalRecycle> ResponseSCEmptyOrnamentalRecycleCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSOrnamentalRecycle> ();

            ProtoSendMethod.BusinessRequest <SCEmptyOrnamentalRecycle>(csornamentalrecycle, opCodeType, ResponseSCEmptyOrnamentalRecycleCallBack, errorCallBack, isShowDefaultTip);
        }