public void AccountLoginRequestSteamWorks() { if (!m_bInitialized) { return; } try { if (hAuthTicket != HAuthTicket.Invalid) { SteamUser.CancelAuthTicket(hAuthTicket); hAuthTicket = HAuthTicket.Invalid; return; } byte[] tokenByteArray = new byte[1024]; uint tokenLen = 0; hAuthTicket = SteamUser.GetAuthSessionTicket(tokenByteArray, tokenByteArray.Length, out tokenLen); GameClientLobby.AccountLoginSteamWorks(tokenByteArray, tokenLen, steamId.m_SteamID); } catch (Exception e) { if (LogFilter.logError) { Debug.LogErrorFormat("{0}\r\n{1}", e.Message, e.StackTrace); } AccountLogoutSteamWorks(); } }
public void GotoMainMenuScene() { GameClientLobby.Disconnect(); GameClientNetwork.Disconnect(); if (PeFlowMgr.Instance.curScene == PeFlowMgr.EPeScene.GameScene && RandomDungenMgrData.InDungeon && PeGameMgr.IsSingleAdventure) { RandomDungenMgr.Instance.SaveInDungeon(); RandomDungenMgr.Instance.DestroyDungeon(); } PeFlowMgr.Instance.LoadScene(PeFlowMgr.EPeScene.MainMenuScene); }
public void OnMultiplayerBtn() { Pathea.PeGameMgr.playerType = Pathea.PeGameMgr.EPlayerType.Multiple; // 临时加入 RandomMapConfig.useSkillTree = false; #if MAINMENU_ISO PeSceneCtrl.Instance.GotoLobbyScene(); return; #endif #if SteamVersion && !LOCALTEST GameClientLobby.ConnectToLobby(); MessageBox_N.ShowMaskBox(MsgInfoType.LobbyLoginMask, PELocalization.GetString(8000118), 30); #elif LOCALTEST GameClientLobby.ConnectToLobby(); #else MessageBox_N.ShowOkBox(PELocalization.GetString(8000117)); #endif }
void Awake() { self = this; }