コード例 #1
0
ファイル: SteamMgr.cs プロジェクト: shrubba/planetexplorers
    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();
        }
    }
コード例 #2
0
 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);
 }
コード例 #3
0
    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
    }
コード例 #4
0
 void Awake()
 {
     self = this;
 }