Ejemplo n.º 1
0
        /// <summary>
        /// Raised when the Live player signed out
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnLiveGamerSignedOut(object sender, SignedOutEventArgs e)
        {
            IdentifiedPlayer identifiedPlayer = LocalPlayers[e.Gamer.PlayerIndex];

            LocalPlayers.Remove(e.Gamer.PlayerIndex);

            OnPlayerLogoff(identifiedPlayer);
        }
Ejemplo n.º 2
0
        protected override void OnGamepadUnplugged(SocketGamepad gamepad)
        {
            SurvivorPlayer Player = (SurvivorPlayer)ActiveGamepads[gamepad];

            Debug.Log("Removing Player " + Player.PlayerId + "(" + gamepad.SGID + ")");
            LocalPlayers.Remove(Player);
            Framing.TrackedObjects.Remove(Player.gameObject);
            ActiveGamepads.Remove(gamepad);

            Destroy(Player.gameObject);
        }
Ejemplo n.º 3
0
        protected override void OnGamepadUnplugged(SocketGamepad gamepad)
        {
            if (ActiveGamepads.ContainsKey(gamepad))
            {
                //Remove from players
                TicTacToePlayer player = (TicTacToePlayer)ActiveGamepads[gamepad];
                player.PlayerIcon.SetActive(false);
                ActiveGamepads.Remove(gamepad);
                LocalPlayers.Remove(player);
                player.Gamepad = null;

                if (XPlayer.Gamepad == null && OPlayer.Gamepad == null)
                {
                    CurrentMode = CurrentModeType.WaitForPlayers;
                }
            }
        }