public void MainLobby() { SoundManager.Instance.play(LoadManager.Instance.GetSFXData(SFXType.Tabsound).clip, AudioSettings.dspTime + Time.deltaTime, 0F, 1F); string sceneName = SceneName.GetMainLobby(GameManager.Instance.LocalPlayer.playerInfo.Race); TransitionManager.Instance.OnSceneTransition(sceneName, TransitionType.Loading01_Blank, null); }
void OnLoginReceived(OperationResponse response) { Debug.Log("[OnLoginReceived]"); switch ((NextAction)response.ReturnCode) { case NextAction.LoginSuccess: byte[] bytes = (byte[])DictionaryTool.GetValue <byte, object> (response.Parameters, 1); ProtoData.UserData data = BinSerializer.Deserialize <ProtoData.UserData> (bytes); GameManager.Instance.Join(data.nickname, (Race)data.race); TransitionManager.Instance.OnSceneTransition(SceneName.GetMainLobby((Race)data.race), TransitionType.Loading01_Slide, null); break; case NextAction.LoginFailed: BasePage.OnMessageBox("로그인에 실패하셨습니다.", true, null, "확인"); break; case NextAction.UserCreateFail: BasePage.OnMessageBox("ID길이가 잘못 되었습니다.\n(2글자 ~ 10글자)", true, null, "확인"); break; case NextAction.UserInfoCreate: Action action = () => { LoginGameMode gameMode = GameManager.Instance.GameMode as LoginGameMode; GameManager.Instance.GameMode.CurrentPage = gameMode.cutScenePage; }; TransitionManager.Instance.OnTransition(TransitionType.Blank, TransitionType.Slide, action, null); break; } }
public void Confirm() { SoundManager.Instance.play(LoadManager.Instance.GetSFXData(SFXType.Tabsound).clip, AudioSettings.dspTime + Time.deltaTime, 0F, 1F); var packet = new ResultRaidRankingRequest( ); packet.score = gameMode.score; packet.SendPacket( ); string sceneName = SceneName.GetMainLobby(GameManager.Instance.LocalPlayer.playerInfo.Race); TransitionManager.Instance.OnSceneTransition(sceneName, TransitionType.Loading01_Slide); }
void OnExitRaidBoss(EventData eventData) { RaidGameMode gameMode = GameManager.Instance.GameMode as RaidGameMode; if (gameMode == null) { return; } string sceneName = SceneName.GetMainLobby(GameManager.Instance.LocalPlayer.playerInfo.Race); TransitionManager.Instance.OnSceneTransition(sceneName, TransitionType.Loading01_Slide); }
void OnEnterRaidReceived(OperationResponse response) { ReturnCode rc = (ReturnCode)response.ReturnCode; if (rc == ReturnCode.Failed) { string sceneName = SceneName.GetMainLobby(GameManager.Instance.LocalPlayer.playerInfo.Race); TransitionManager.Instance.OnSceneTransition(sceneName, TransitionType.Loading01_Blank, null); Debug.LogError("로비 데이터를 받는데 실패했습니다."); return; } GameManager.Instance.GameMode.OnSynchronize(BinSerializer.ConvertData <ProtoData.RaidEnterData> (response.Parameters)); }
void OnUserResistrationReceived(OperationResponse response) { Debug.Log("[OnUserResistrationReceived]"); ReturnCode rc = (ReturnCode)response.ReturnCode; if (rc == ReturnCode.Success) { byte[] bytes = (byte[])DictionaryTool.GetValue <byte, object> (response.Parameters, 1); ProtoData.UserData data = BinSerializer.Deserialize <ProtoData.UserData> (bytes); GameManager.Instance.Join(data.nickname, (Race)data.race); TransitionManager.Instance.OnSceneTransition(SceneName.GetMainLobby(GameManager.Instance.LocalPlayer.playerInfo.Race), TransitionType.Loading01_Slide, null); } else { BasePage.OnMessageBox("닉네임의 길이가 잘못 되었습니다.\n(3글자 ~ 6글자)", true, null, "확인"); } }
void OnLobbyEnterRecevied(OperationResponse response) { Debug.Log("[OnLobbyEnterRecevied]"); ReturnCode rc = (ReturnCode)response.ReturnCode; if (rc == ReturnCode.Failed) { new LobbyEnterRequest( ).SendPacket(); Debug.LogError("로비 데이터를 받는데 실패했습니다."); return; } var data = BinSerializer.ConvertData <ProtoData.DBLoadData> (response.Parameters); if (data.buildingDataList == null || data.buildingDataList.Count == 0) { new LobbyEnterRequest( ).SendPacket( ); Debug.LogError("건물 데이터를 받는데 실패했습니다."); return; } else if (data.resourceData == null) { new LobbyEnterRequest( ).SendPacket( ); Debug.LogError("유저 자원 데이터를 받는데 실패했습니다."); return; } MainLobbyGameMode gamemode = GameManager.Instance.GameMode as MainLobbyGameMode; if (gamemode == null) { string sceneName = SceneName.GetMainLobby(GameManager.Instance.LocalPlayer.playerInfo.Race); TransitionManager.Instance.OnSceneTransition(sceneName, TransitionType.Loading01_Blank, null); return; } gamemode.OnSynchronize(data); }