private void EnterRoom(Payloader <SC_EnterRoom> payloader) { payloader.Callback( success: (data) => { }); }
protected void CompleteLoading(Payloader <SC_CompleteLoading> payloader) { payloader.Callback( success: (data) => { }); }
protected void Play(Payloader <SC_Play> payloader) { payloader.Callback( success: (data) => { }); }
protected void CombineCube(Payloader <SC_CombineCube> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.CombineCube(data.OwnerSeq, data.TargetSeq); }); }
private void ExitMatch(Payloader <SC_ExitMatch> payloader) { payloader.Callback( success: (data) => { Router.Close("MatchView"); }); }
private void EnterMatch(Payloader <SC_EnterMatch> payloader) { payloader.Callback( success: (data) => { Router.Open("MatchView"); }); }
private void ExitRoom(Payloader <SC_ExitRoom> payloader) { payloader.Callback( success: (data) => { Router.CloseAndOpen("LobbyView/PlayView"); }); }
protected void DeleteCube(Payloader <SC_DeleteCube> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.DeleteCube(data.DeleteCubes); }); }
protected void ShotMissile(Payloader <SC_ShotMissile> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.ShotMissile(data.CubeSeq, data.MonsterSeq); }); }
protected void MoveCube(Payloader <SC_MoveCube> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.MoveCube(data.CubeSeq, data.PositionX, data.PositionY); }); }
protected void Wave(Payloader <SC_Wave> payloader) { payloader.Callback( success: (data) => { StartCoroutine(WaveMonster(8f)); }); }
protected void CreateCube(Payloader <SC_CreateCube> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.CreateCube(data.NewCube); Router.Refresh(); }); }
private void Loading(Payloader <SC_Loading> payloader) { payloader.Callback( success: (data) => { ServerInfo.GameUsers = data.Users; SceneManager.LoadScene("MultiGame", LoadSceneMode.Single); }); }
private void Login(Payloader <SC_Login> payloader) { payloader.Callback( success: (data) => { ServerInfo.isLogin = true; Router.CloseAndOpen("LobbyView/PlayView"); }); }
protected void UpdateSlot(Payloader <SC_UpdateSlot> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.UpdateSlot(data.SlotIndex, data.SlotLv); Router.Refresh(); }); }
protected void DieMonster(Payloader <SC_DieMonster> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.DieMonster(data.MonsterSeq); Router.Refresh(); }); }
protected void EscapeMonster(Payloader <SC_EscapeMonster> payloader) { payloader.Callback( success: (data) => { GetTeam(data.Id)?.EscapeMonster(data.MonsterSeq); Router.Refresh(); CheckResult(); }); }
protected virtual void Result(Payloader <SC_Result> payloader) { payloader.Callback( success: (data) => { GetTeams().ForEach(x => x.UnRegister()); ServerInfo.GameUsers = data.Users; Router.Open("ResultView"); var my = ServerInfo.MyGameUser(); LobbyServer.sInstance.UpdateMoney(my.Id, my.Money); }); }
protected override void Result(Payloader <SC_Result> payloader) { payloader.Callback( success: (data) => { GetTeams().ForEach(x => x.UnRegister()); ServerInfo.GameUsers = data.Users; ServerInfo.GameUsers.FirstOrDefault().Id = tempUserId; ServerInfo.GameUsers.FirstOrDefault().Name = tempUserName; ServerInfo.User.Id = tempUserId; ServerInfo.User.Name = tempUserName; Router.Open("ResultView"); }); }
private void SuccessMatch(Payloader <SC_SuccessMatch> payloader) { payloader.Callback( success: (data) => { var slots = ServerInfo.User.Entry.Slots.ToList().Select((x, i) => { var cube = ServerInfo.User.Cubes.Find(c => c.CubeId == x); return(new GameSlot() { SlotIndex = (byte)i, CubeId = cube.CubeId, CubeLv = cube.Lv, }); }).ToList(); GameServer.sInstance?.EnterRoom(data.GroupName, new RoomUser() { Id = ServerInfo.User.Id, Slots = slots, }); }); }