示例#1
0
        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);
        }
示例#3
0
 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());
     });
 }
示例#4
0
 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());
     });
 }
示例#5
0
        //--------------------------------------
        //  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);
        }