Exemplo n.º 1
0
        private void Awake()
        {
            if (UseSteam)
            {
                try
                {
                    if (SteamAPI.RestartAppIfNecessary(AppId_t.Invalid))
                    {
                        Application.Quit();
                        return;
                    }
                }
                catch (System.DllNotFoundException e)
                {
                    Application.Quit();
                    return;
                }
                SteamInitialized = SteamAPI.Init();
                SteamLoginComponents.SteamName.text    = "Welcome, " + SteamFriends.GetPersonaName() + "!";
                SteamRegisterComponents.SteamName.text = "Welcome, " + SteamFriends.GetPersonaName() + "!";
            }

            instance = this;
            DontDestroyOnLoad(transform.gameObject);

            if (UseSteam)
            {
                LoginComponents.Window.SetActive(false);
                SteamLoginComponents.Window.SetActive(true);
            }
            else
            {
                LoginComponents.Window.SetActive(true);
                SteamLoginComponents.Window.SetActive(false);
            }
            RegisterComponents.Window.SetActive(false);
            SteamRegisterComponents.Window.SetActive(false);
        }
Exemplo n.º 2
0
 private void Awake()
 {
     instance = this;
     DontDestroyOnLoad(transform.gameObject);
     socket = IO.Socket(BackendUrl);
 }
Exemplo n.º 3
0
 public void Save()
 {
     LoginHandler.RunCoroutine(SaveData());
 }
Exemplo n.º 4
0
 public void GetFriends()
 {
     LoginHandler.RunCoroutine(GetFriendData());
 }