Ejemplo n.º 1
0
 protected override void OnGamepadUnplugged(SocketGamepad gamepad)
 {
     if (ActiveGamepads.ContainsKey(gamepad))
     {
         FyoPlayer Player = ActiveGamepads[gamepad];
         ActiveGamepads.Remove(gamepad);
         Destroy(Player.gameObject);
     }
 }
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;
                }
            }
        }