Exemplo n.º 1
0
 // Invoked when any sign in operation has completed
 private void DidLogin(Gamer newGamer)
 {
     if (Gamer != null) {
         Debug.LogWarning("Current gamer " + Gamer.GamerId + " has been dismissed");
         Loop.Stop();
     }
     Gamer = newGamer;
     Loop = Gamer.StartEventLoop();
     Loop.ReceivedEvent += Loop_ReceivedEvent;
     Debug.Log("Signed in successfully (ID = " + Gamer.GamerId + ")");
 }
Exemplo n.º 2
0
	// Invoked when any sign in operation has completed
	private void DidLogin(Gamer newGamer) {
		if (Gamer != null) {
			Debug.LogWarning("Current gamer " + Gamer.GamerId + " has been dismissed");
			Loop.Stop();
		}
		Gamer = newGamer;
		Loop = Gamer.StartEventLoop();
		Loop.ReceivedEvent += Loop_ReceivedEvent;
		Debug.Log("Signed in successfully (ID = " + Gamer.GamerId + ")");
		// Keep login in persistent memory to restore next time
		PlayerPrefs.SetString("GamerInfo", new GamerInfo(Gamer).ToJson());
		// Notify others
		if (GamerChanged != null) GamerChanged(this, new EventArgs());
	}