Beispiel #1
0
        protected BridgeResponse SyncInvokePlatform(CallPlatformMethod invokeMethod, params JsonData[] args)
        {
            var request     = BridgeRequest.Create(invokeMethod.ToString(), args);
            var requestJson = request.ToJson();

            BridgeResponse response = null;

            try
            {
                var result = InvokePlatform(requestJson);
                response = BridgeResponse.Deserialize(result);

                if (response == null)
                {
                    DebugUtility.LogError(LoggerTags.Module, "同步调用 -> arg:{0}; 解析错误 -> result:{1}", requestJson, result);
                    response = BridgeResponse.CreateErrorResponse(request.id, BridgeCode.ReturnTypeError);
                    return(response);
                }
                else
                {
                    DebugUtility.Log(LoggerTags.Module, "同步调用 -> arg:{0}; 返回 -> result:{1}", requestJson, result);
                    return(response);
                }
            }
            catch (Exception ex)
            {
                DebugUtility.LogError(LoggerTags.Module, "同步调用 -> arg:{0}; 异常 -> Exception:{1}", requestJson, ex);
                response = BridgeResponse.CreateErrorResponse(request.id, BridgeCode.InvokeParamError);
                return(response);
            }
        }
Beispiel #2
0
        public override void OnActivate(int pinID)
        {
            if (pinID != 0 && pinID != 3)
            {
                return;
            }
            MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;

            instance.TimeOutSec           = this.TimeOutSec;
            instance.SendRoomMessageFlush = this.FlushRoomMsg;
            instance.DisconnectIfSendRoomMessageFailed = this.DisconnectIfSendFailed;
            instance.SortRoomMessage = this.SortRoomMsg;
            if (instance.CurrentState == MyPhoton.MyState.LOBBY)
            {
                DebugUtility.Log("already enter lobby");
                this.Success();
            }
            else
            {
                ((Behaviour)this).set_enabled(true);
                if (instance.CurrentState != MyPhoton.MyState.NOP)
                {
                    instance.Disconnect();
                }
                this.mStateMachine = new StateMachine <FlowNode_MultiPlayEnterLobby>(this);
                if (pinID == 0)
                {
                    this.mStateMachine.GotoState <FlowNode_MultiPlayEnterLobby.State_ConnectLobby>();
                }
                else
                {
                    this.mStateMachine.GotoState <FlowNode_MultiPlayEnterLobby.State_ConnectLobbyAuto>();
                }
            }
        }
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 101:
                MyPhoton instance1 = PunMonoSingleton <MyPhoton> .Instance;
                if (!instance1.IsOldestPlayer())
                {
                    DebugUtility.Log("I'm not room owner");
                    this.ActivateOutputLinks(2);
                    break;
                }
                MyPhoton.MyRoom currentRoom1 = instance1.GetCurrentRoom();
                if (currentRoom1 == null)
                {
                    DebugUtility.Log("CurrentRoom is null");
                    this.ActivateOutputLinks(2);
                    break;
                }
                JSON_MyPhotonRoomParam myPhotonRoomParam = JSON_MyPhotonRoomParam.Parse(currentRoom1.json);
                if (myPhotonRoomParam == null)
                {
                    DebugUtility.Log("no roomParam");
                    this.ActivateOutputLinks(2);
                    break;
                }
                myPhotonRoomParam.challegedMTFloor = GlobalVars.SelectedMultiTowerFloor;
                myPhotonRoomParam.iname            = GlobalVars.SelectedMultiTowerID + "_" + myPhotonRoomParam.challegedMTFloor.ToString();
                instance1.SetRoomParam(myPhotonRoomParam.Serialize());
                instance1.UpdateRoomParam("floor", (object)GlobalVars.SelectedMultiTowerFloor);
                GlobalVars.SelectedQuestID = myPhotonRoomParam.iname;
                this.ActivateOutputLinks(1);
                break;

            case 102:
                MyPhoton instance2 = PunMonoSingleton <MyPhoton> .Instance;
                if (!instance2.IsOldestPlayer())
                {
                    DebugUtility.Log("I'm not room owner");
                    this.ActivateOutputLinks(2);
                    break;
                }
                MyPhoton.MyRoom currentRoom2 = instance2.GetCurrentRoom();
                if (currentRoom2 == null)
                {
                    DebugUtility.Log("CurrentRoom is null");
                    this.ActivateOutputLinks(2);
                    break;
                }
                if (JSON_MyPhotonRoomParam.Parse(currentRoom2.json) == null)
                {
                    DebugUtility.Log("no roomParam");
                    this.ActivateOutputLinks(2);
                    break;
                }
                instance2.UpdateRoomParam("Lock", (object)(GlobalVars.EditMultiPlayRoomPassCode != "0"));
                this.ActivateOutputLinks(1);
                break;
            }
        }
 private void Update()
 {
     if (!this.startCheck)
     {
         return;
     }
     if ((this.m_checkFlag & FlowNode_CheckSceneChangeUrlScheme.CheckFlag.FinishedCheck) != (FlowNode_CheckSceneChangeUrlScheme.CheckFlag) 0)
     {
         this.Finished();
     }
     else if ((this.m_checkFlag & FlowNode_CheckSceneChangeUrlScheme.CheckFlag.FinishEndMovie) != (FlowNode_CheckSceneChangeUrlScheme.CheckFlag) 0)
     {
         this.m_checkFlag |= FlowNode_CheckSceneChangeUrlScheme.CheckFlag.FinishedCheck;
         DebugUtility.Log("CheckSceneChangeUrlScheme => Flag = FinishedCheck");
     }
     else if (StreamingMovie.IsPlaying)
     {
         if ((this.m_checkFlag & FlowNode_CheckSceneChangeUrlScheme.CheckFlag.StartEndMovie) != (FlowNode_CheckSceneChangeUrlScheme.CheckFlag) 0)
         {
             return;
         }
         this.PushMovieEndEvent();
     }
     else
     {
         this.m_checkFlag |= FlowNode_CheckSceneChangeUrlScheme.CheckFlag.FinishEndMovie;
         DebugUtility.Log("CheckSceneChangeUrlScheme => Flag = FinishEndMovie");
     }
 }
Beispiel #5
0
        public void OnPointerExit(PointerEventData eventData)
        {
#if UNITY_EDITOR
            DebugUtility.Log(LoggerTags.UI, "OnPointerExit : {0}", name);
#endif
            m_ExitEvent.Invoke(this, eventData);
        }
Beispiel #6
0
 private void Failure()
 {
     DebugUtility.Log("RegisterBirthday failure");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(200);
 }
Beispiel #7
0
        protected override IProtocol ExecuteUKitCommands(ICommand command)
        {
            ExploreProtocol result = ExploreProtocol.CreateResponse(ProtocolCode.Failure, command); do

            {
                if (command is UKitCommands.ColorRecognitionCommand)
                {
                    debug = command.debug;
                    var cmd = (UKitCommands.ColorRecognitionCommand)command;
                    if (LineTrace(out var distance, out Color rgb))
                    {
                        result.SetDatas(Misc.Nearly(cmd.color, rgb));
                        result.code = 0;

                        DebugUtility.Log(LoggerTags.Project, "ColorRecognitionCommand Reacted : {0}m", distance);
                    }
                    break;
                }
                if (command is UKitCommands.ColorRecognitionRGBCommand)
                {
                    debug = command.debug;
                    //var cmd = (UKitCommands.UltrasonicCommand)command;
                    if (LineTrace(out var distance, out Color rgb))
                    {
                        result.SetDatas((int)(rgb.r * 255), (int)(rgb.g * 255), (int)(rgb.b * 255));
                        result.code = 0;

                        DebugUtility.Log(LoggerTags.Project, "ColorRecognitionRGBCommand Reacted : {0}m", distance);
                    }
                    break;
                }
            } while (false);

            return(result);
        }
 private void LimitOver()
 {
     DebugUtility.Log("CheckChargeLimit limitover");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(204);
 }
 private void VipRemains()
 {
     DebugUtility.Log("CheckChargeLimit vipremains");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(205);
 }
Beispiel #10
0
        private void InvokeReadyToPlayCallback()
        {
            DebugUtility.Log(Constants.LOG_TAG, string.Format("Map({0}) Ready To Play", m_MapUid));
            //Debug.LogError("InvokeReadyToPlayCallback");
            try
            {
                DebugUtility.Log(Constants.LOG_TAG, "Begin Invoke OnReadyToPlayCallback");
                m_ForReadyToPlayCallback.OnReadyToPlayCallback?.Invoke();
                DebugUtility.Log(Constants.LOG_TAG, "End Invoke OnReadyToPlayCallback");
            }
            catch (System.Exception e)
            {
                DebugUtility.LogError(Constants.LOG_TAG, string.Format("Invoke OnReadyToPlayCallback Exception:\n{0}", e.ToString()));
            }
            finally
            {
                m_ForReadyToPlayCallback = null;
            }

            try
            {
                DebugUtility.Log(Constants.LOG_TAG, "Begin Invoke _OnChangedMap");
                MapManager.GetInstance()._OnChangedMap?.Invoke(m_MapUid);
                DebugUtility.Log(Constants.LOG_TAG, "End Invoke _OnChangedMap");
            }
            catch (System.Exception e)
            {
                DebugUtility.LogError(Constants.LOG_TAG, string.Format("Invoke _OnChangedMap Exception:\n{0}", e.ToString()));
            }
        }
Beispiel #11
0
    private string GetPersistFileName()
    {
        string str = Application.get_persistentDataPath() + "/gu3p.dat";

        DebugUtility.Log(">>>>>>>>>>>>>>>>>>>> GetPersistFileName path:" + str);
        return(str);
    }
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 0:
                DebugUtility.Log("raid selected");
                GlobalVars.SelectedMultiPlayRoomType = JSON_MyPhotonRoomParam.EType.RAID;
                break;

            case 1:
                DebugUtility.Log("versus selected");
                GlobalVars.SelectedMultiPlayRoomType = JSON_MyPhotonRoomParam.EType.VERSUS;
                break;

            case 2:
                DebugUtility.Log("tower selected");
                GlobalVars.SelectedMultiPlayRoomType = JSON_MyPhotonRoomParam.EType.TOWER;
                break;
            }
            switch (GlobalVars.SelectedMultiPlayRoomType)
            {
            case JSON_MyPhotonRoomParam.EType.RAID:
                this.ActivateOutputLinks(100);
                break;

            case JSON_MyPhotonRoomParam.EType.VERSUS:
                this.ActivateOutputLinks(101);
                break;

            case JSON_MyPhotonRoomParam.EType.TOWER:
                this.ActivateOutputLinks(102);
                break;
            }
        }
        private void RefreshSubPanel(int index = -1)
        {
            this.ClearPanel();
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.MainPanelCloseBtn, (UnityEngine.Object)null))
            {
                DebugUtility.LogWarning("UnitEvolutionWindow.cs => RefreshSubPanel():MainPanelCloseBtn is Null References!");
            }
            else
            {
                ((Component)this.MainPanelCloseBtn).get_gameObject().SetActive(false);
                if (index < 0)
                {
                    DebugUtility.LogWarning("UnitEvolutionWindow.cs => RefreshSubPanel():index is 0!");
                }
                else
                {
                    RecipeParam currentRecipe = this.GetCurrentRecipe(this.mCurrentUnit);
                    if (currentRecipe == null)
                    {
                        DebugUtility.LogError("UnitEvolutionWindow.cs => RefreshSubPanel():recipeParam is Null References!");
                    }
                    else
                    {
                        ItemParam itemParam = MonoSingleton <GameManager> .GetInstanceDirect().GetItemParam(currentRecipe.items[index].iname);

                        if (itemParam == null)
                        {
                            DebugUtility.LogError("UnitEvolutionWindow.cs => RefreshSubPanel():itemParam is Null References!");
                        }
                        else
                        {
                            this.SubPanel.SetActive(true);
                            DataSource.Bind <ItemParam>(this.SubPanel, itemParam);
                            GameParameter.UpdateAll(this.SubPanel.get_gameObject());
                            if (this.mLastSelectItemIname != itemParam.iname)
                            {
                                this.ResetScrollPosition();
                                this.mLastSelectItemIname = itemParam.iname;
                            }
                            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)QuestDropParam.Instance, (UnityEngine.Object)null))
                            {
                                return;
                            }
                            QuestParam[]      availableQuests   = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
                            List <QuestParam> itemDropQuestList = QuestDropParam.Instance.GetItemDropQuestList(itemParam, GlobalVars.GetDropTableGeneratedDateTime());
                            using (List <QuestParam> .Enumerator enumerator = itemDropQuestList.GetEnumerator())
                            {
                                while (enumerator.MoveNext())
                                {
                                    QuestParam qp = enumerator.Current;
                                    DebugUtility.Log("QuestList:" + qp.iname);
                                    bool isActive = Array.Find <QuestParam>(availableQuests, (Predicate <QuestParam>)(p => p.iname == qp.iname)) != null;
                                    this.AddList(qp, isActive);
                                }
                            }
                        }
                    }
                }
            }
        }
Beispiel #14
0
    public override void OnActivate(int pinID)
    {
        MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;
        JSON_MyPhotonPlayerParam photonPlayerParam = JSON_MyPhotonPlayerParam.Parse(instance.GetMyPlayer().json);

        switch (pinID)
        {
        case 100:
            DebugUtility.Log("[MultiPlay]Ready!");
            photonPlayerParam.state = 1;
            instance.SetMyPlayerParam(photonPlayerParam.Serialize());
            this.ActivateOutputLinks(1);
            break;

        case 101:
            DebugUtility.Log("[MultiPlay]Cancel ready...");
            photonPlayerParam.state = 0;
            instance.SetMyPlayerParam(photonPlayerParam.Serialize());
            this.ActivateOutputLinks(2);
            break;

        case 102:
            DebugUtility.Log("[MultiPlay]Change Edit!");
            photonPlayerParam.state = 4;
            instance.SetMyPlayerParam(photonPlayerParam.Serialize());
            this.ActivateOutputLinks(3);
            break;
        }
    }
Beispiel #15
0
        private void OnSelectItem(GameObject go)
        {
            QuestParam dataOfClass = DataSource.FindDataOfClass <QuestParam>(go, (QuestParam)null);

            if (dataOfClass == null || !Object.op_Inequality((Object)QuestDropParam.Instance, (Object)null))
            {
                return;
            }
            bool flag = QuestDropParam.Instance.IsChangedQuestDrops(dataOfClass);

            GlobalVars.SetDropTableGeneratedTime();
            if (flag && !QuestDropParam.Instance.IsWarningPopupDisable)
            {
                UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.PARTYEDITOR_DROP_TABLE"), (UIUtility.DialogResultEvent)(obj =>
                {
                    ListItemEvents component = (ListItemEvents)go.GetComponent <ListItemEvents>();
                    if (!Object.op_Inequality((Object)component, (Object)null))
                    {
                        return;
                    }
                    component.OpenDetail();
                }), (GameObject)null, false, -1);
            }
            else
            {
                GlobalVars.SelectedQuestID = dataOfClass.iname;
                DebugUtility.Log("Select Quest:" + GlobalVars.SelectedQuestID);
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
            }
        }
 private void Success()
 {
     DebugUtility.Log("CheckChargeLimit success");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(100);
 }
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 0:
                string format1  = LocalizedText.Get("sys.MP_LINE_TEXT");
                string msg1     = string.Empty + "iname=" + GlobalVars.SelectedQuestID + "&type=" + (object)GlobalVars.SelectedMultiPlayRoomType + "&creatorFUID=" + JSON_MyPhotonRoomParam.GetMyCreatorFUID() + "&roomid=" + (object)GlobalVars.SelectedMultiPlayRoomID;
                byte[] inArray1 = MyEncrypt.Encrypt(JSON_MyPhotonRoomParam.LINE_PARAM_ENCODE_KEY, msg1, false);
                string str1     = string.Format(format1, (object)WWW.EscapeURL(Convert.ToBase64String(inArray1)));
                DebugUtility.Log("LINE:" + str1);
                Application.OpenURL(LocalizedText.Get("sys.MP_LINE_HTTP") + WWW.EscapeURL(str1, Encoding.UTF8));
                this.ActivateOutputLinks(1);
                break;

            case 100:
                if (JSON_MyPhotonRoomParam.GetMyCreatorFUID().Equals(FlowNode_OnUrlSchemeLaunch.LINEParam_decided.creatorFUID))
                {
                    this.ActivateOutputLinks(101);
                    break;
                }
                this.ActivateOutputLinks(102);
                break;

            case 200:
                string format2  = LocalizedText.Get("sys.MP_LINE_VERSUS_TEXT");
                string msg2     = string.Empty + "iname=" + GlobalVars.SelectedQuestID + "&type=" + (object)GlobalVars.SelectedMultiPlayRoomType + "&creatorFUID=" + JSON_MyPhotonRoomParam.GetMyCreatorFUID() + "&roomid=" + (object)GlobalVars.SelectedMultiPlayRoomID;
                byte[] inArray2 = MyEncrypt.Encrypt(JSON_MyPhotonRoomParam.LINE_PARAM_ENCODE_KEY, msg2, false);
                string str2     = string.Format(format2, (object)WWW.EscapeURL(Convert.ToBase64String(inArray2)));
                DebugUtility.Log("LINE:" + str2);
                Application.OpenURL(LocalizedText.Get("sys.MP_LINE_HTTP") + WWW.EscapeURL(str2, Encoding.UTF8));
                GlobalVars.VersusRoomReuse = true;
                this.ActivateOutputLinks(1);
                break;
            }
        }
 private void Failure()
 {
     DebugUtility.Log("CheckChargeLimit failure");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(200);
 }
Beispiel #19
0
        /// <summary>
        /// 从仿真到Scratch 发送消息
        /// </summary>
        /// <param name="message"></param>
        public void SendMessage(IProtocol message)
        {
            if (useByteStreaming)
            {
                if (mConn == null || !mConn.state.IsConnected())
                {
                    DebugUtility.LogError(LoggerTags.Online, "SendMessage Failed : Please connect to a host. Message({0})", message);
                    return;
                }

                message.ToBytes(ProtocolOutput.ExploreToScratch, out var encryption, out var bytes);
                if (bytes != null && bytes.Length > 0)
                {
                    DebugUtility.Log(LoggerTags.Online, "SendMessage : {0}", message);
                    mConn.SendMessage(bytes);
                }
                else
                {
                    DebugUtility.LogError(LoggerTags.Online, "SendMessage Failed : Try to send empty message to scratch ({0})", message);
                }
            }
            else
            {
                message.ToString(ProtocolOutput.ExploreToScratch, out var result);
                SendMessage(result);
            }
        }
 private void NonAge()
 {
     DebugUtility.Log("CheckChargeLimit nonage");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(201);
 }
Beispiel #21
0
 private void Success()
 {
     DebugUtility.Log("GetProducts success");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(100);
 }
 private void NeedCheck()
 {
     DebugUtility.Log("CheckChargeLimit needcheck");
     ((Behaviour)this).set_enabled(false);
     this.RemoveDelegate();
     this.ActivateOutputLinks(202);
 }
 private void Finished()
 {
     this.startCheck  = false;
     this.m_checkFlag = (FlowNode_CheckSceneChangeUrlScheme.CheckFlag) 0;
     this.ActivateOutputLinks(100);
     DebugUtility.Log("CheckSceneChangeUrlScheme => Finished");
 }
            public override void Begin(FlowNode_MultiPlayJoinRoom self)
            {
                MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;

                self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
                if (self.mJoinPlayerParam == null)
                {
                    self.FailureLobby();
                }
                else
                {
                    int lrange = -1;
                    int frange = -1;
                    int lv     = MonoSingleton <GameManager> .Instance.Player.CalcLevel();

                    int versusTowerFloor = MonoSingleton <GameManager> .Instance.Player.VersusTowerFloor;
                    MonoSingleton <GameManager> .Instance.GetRankMatchCondition(out lrange, out frange);

                    if (instance.JoinRoomCheckParam(GlobalVars.MultiPlayVersusKey, self.mJoinPlayerParam.Serialize(), lrange, frange, lv, versusTowerFloor))
                    {
                        return;
                    }
                    DebugUtility.Log("error:" + (object)instance.LastError);
                    self.FailureLobby();
                }
            }
Beispiel #25
0
        public void TryCloseMap()
        {
            DebugUtility.Log(Constants.LOG_TAG, "Try Close Map");
            DebugUtility.Assert(m_State == State.Normal, Constants.LOG_TAG, "m_State == State.Normal");

            m_State = State.ClosingMap;
        }
            public override void Update(FlowNode_MultiPlayJoinRoom self)
            {
                MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;

                MyPhoton.MyState currentState = instance.CurrentState;
                if (!((Behaviour)self).get_enabled())
                {
                    return;
                }
                switch (currentState)
                {
                case MyPhoton.MyState.LOBBY:
                    DebugUtility.Log("[PUN]joining failed, back to lobby." + (object)instance.LastError);
                    if (instance.LastError == MyPhoton.MyError.ROOM_IS_FULL)
                    {
                        self.FailureFullMember();
                        break;
                    }
                    self.FailureLobby();
                    break;

                case MyPhoton.MyState.JOINING:
                    break;

                case MyPhoton.MyState.ROOM:
                    GlobalVars.SelectedMultiPlayRoomName = instance.GetCurrentRoom().name;
                    self.GotoState <FlowNode_MultiPlayJoinRoom.State_DecidePlayerIndex>();
                    break;

                default:
                    self.Failure();
                    break;
                }
            }
Beispiel #27
0
        private void OnSelectItem(GameObject go)
        {
            MultiPlayAPIRoom dataOfClass = DataSource.FindDataOfClass <MultiPlayAPIRoom>(go, (MultiPlayAPIRoom)null);

            if (dataOfClass == null)
            {
                return;
            }
            GlobalVars.SelectedMultiPlayRoomID           = dataOfClass.roomid;
            GlobalVars.SelectedMultiPlayRoomPassCodeHash = dataOfClass.pwd_hash;
            GlobalVars.SelectedMultiTowerFloor           = dataOfClass.floor;
            DebugUtility.Log("Select RoomID:" + (object)GlobalVars.SelectedMultiPlayRoomID + " PassCodeHash:" + GlobalVars.SelectedMultiPlayRoomPassCodeHash);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
            Transform transform1 = go.get_transform().Find("cursor");

            if (!Object.op_Inequality((Object)transform1, (Object)null))
            {
                return;
            }
            for (int index = 0; index < this.mRoomList.Count; ++index)
            {
                Transform transform2 = this.mRoomList[index].get_transform().Find("cursor");
                if (Object.op_Inequality((Object)transform2, (Object)null))
                {
                    ((Component)transform2).get_gameObject().SetActive(false);
                }
            }
            ((Component)transform1).get_gameObject().SetActive(true);
        }
 private void Failure()
 {
     this.mStateMachine = (StateMachine <FlowNode_StartMultiPlay>)null;
     ((Behaviour)this).set_enabled(false);
     this.ActivateOutputLinks(2);
     DebugUtility.Log("StartMultiPlay failure");
 }
Beispiel #29
0
        public override ICommandResponseAsync Execute(ICommand command)
        {
            IProtocol result = null;

            switch (command.commandID)
            {
            case ECommand.ServoCommand:
            {
                result = ExecuteServoCommands(command);
                break;
            }
            }

            if (result == null)
            {
                DebugUtility.LogError(LoggerTags.Project, "Failure to execute command : {0}", command);
            }
            else
            {
                DebugUtility.Log(LoggerTags.Project, "Success to execute command : {0}", command);
            }
            var cra = new CommandResponseAsync(result);

            cra.host    = command.host;
            cra.context = command.context;
            return(cra);
        }
        private void ExecNormalGachaMany()
        {
            this.StartGachaScene(FlowNode_ExecGacha.GachaModes.NormalX);
            MonoSingleton <GameManager> .Instance.Player.OnGacha(GachaTypes.Normal, 10);

            if (Network.Mode == Network.EConnectMode.Offline)
            {
                int      length = 10;
                string[] items  = new string[length];
                for (int index = 0; index < length; ++index)
                {
                    string itemID = this.mGacha.ExecGacha("Gacha_gold");
                    MonoSingleton <GameManager> .Instance.Player.GainItem(itemID, 1);

                    items[index] = itemID;
                }
                DebugUtility.Log(FlowNode_ExecGacha.GACHA_GOLD_MANY_COST.ToString());
                MonoSingleton <GameManager> .Instance.Player.DEBUG_ADD_GOLD(-FlowNode_ExecGacha.GACHA_GOLD_MANY_COST);

                this.SetGachaResult(items);
            }
            else
            {
                ((Behaviour)this).set_enabled(true);
            }
        }