private void UpdatePlayerInfo(ISN_GKLocalPlayer player) { var localPlayer = new UM_IOSPlayer(player); var playerInfo = new UM_PlayerInfo(UM_PlayerState.SignedIn, localPlayer); UpdateSignedPlater(playerInfo); }
//-------------------------------------- // Protected Methods //-------------------------------------- protected void UpdateSignedPlater(UM_PlayerInfo info) { m_currentPlayerInfo = info; m_onPlayerChanged.Invoke(); UM_AnalyticsInternal.OnPlayerUpdated(info); }
public void SingOut(Action <SA_Result> callback) { UM_EditorAPIEmulator.WaitForNetwork(() => { var playerInfo = new UM_PlayerInfo(UM_PlayerState.SignedOut, null); UpdateSignedPlater(playerInfo); callback.Invoke(new SA_Result()); }); }
protected override void StartSingInFlow(Action <SA_Result> callback) { UM_EditorAPIEmulator.WaitForNetwork(() => { var playerInfo = new UM_PlayerInfo(UM_PlayerState.SignedIn, UM_Settings.Instance.GSEditorPlayer); UpdateSignedPlater(playerInfo); callback.Invoke(new SA_Result()); }); }
//-------------------------------------- // Private Methods //-------------------------------------- private void UpdatePlayerInfo(AN_Player player) { UM_PlayerInfo playerInfo; if (player != null) { playerInfo = new UM_PlayerInfo(UM_PlayerState.SignedIn, new UM_AndroidPlayer(player)); } else { playerInfo = new UM_PlayerInfo(UM_PlayerState.SignedOut, null); } UpdateSignedPlater(playerInfo); }