Ejemplo n.º 1
0
        private bool SteamLogin()
        {
            if (!File.Exists("steam_appid.txt"))
            {
                try
                {
                    File.WriteAllText("steam_appid.txt", Engine.AppId.ToString());
                }
                catch (Exception e)
                {
                    return(FailLogin(e.Message));
                }
            }

            if (!SteamAPI.Init())
            {
                return(FailLogin(
                           "Could initialize SteamAPI - Make sure Steam is running and the AppID is valid."));
            }

            SteamAPI.RunCallbacks();
            SteamId     = SteamUser.GetSteamID();
            UserId      = SteamId.GetAccountID().m_AccountID;
            ProfileName = SteamFriends.GetPersonaName();

            LoginSucceeded.Fire(ProfileName);

            return(true);
        }