public void OnClick_Ok() { ReqSangcharim req = new ReqSangcharim(); req.Sangcharim = sangcharim; JgRefs.ins_.msg.SendMessageToServer(JgC2S_Msgs.kSangcharim, req); Debug.Log(string.Format("AppPlayer has chosen {0} \n", sangcharim)); PlayerPrefs.SetInt(Key_Sangcharim, (int)this.sangcharim); JVCMgr.ins_.PopView(); JgRefs.ins_.vcInGame.Show(true); //JVCMgr.ins_.PushView(JgRefs.ins_.vcInGame); }
void HandleMessage(JStateObject state, ReqSangcharim req) { sangcharims[state.indexInRoom] = req.Sangcharim; Debug.Log(string.Format("<color=green>R: ({0}-{1}) has sent {2} </color> \n", state.indexInRoom, state.name, req.Sangcharim)); if (sangcharims[0] != Sangcharim.kUnknown && sangcharims[1] != Sangcharim.kUnknown) { NtfSangcharim ntf = new NtfSangcharim(); ntf.Cho = sangcharims[0]; ntf.Han = sangcharims[1]; NotifyMessageToAllClients((byte)JgS2C_Msgs.kNtfSangcharim, ntf); UpdateMapForSangcharim(ntf.Cho, ntf.Han); //this.Invoke("StartGame", 0.5f); //StartGame(); workQueue.Add(StartGame); //this.Invoke("StartGame", 1f); } else if (state.indexInRoom == 1) // Is Han { NtfSangcharimHan ntf = new NtfSangcharimHan(); ntf.Han = sangcharims[HAN]; SendMessageToClient(choState, (byte)JgS2C_Msgs.kNtfSangcharimHan, ntf); } }
void SendSangcharim() { //if (nation == JgNation.kCho) { ReqSangcharim req = new ReqSangcharim(); req.Sangcharim = Sangcharim.kMSMS; msg.SendMessageToServer(JgC2S_Msgs.kSangcharim, req); } }