Ejemplo n.º 1
0
    int GetPlayerNum(PlayerController.Player player)
    {
        int playerNum = -1;

        switch (player)
        {
        case PlayerController.Player.Debug:
        case PlayerController.Player.One:
            playerNum = 0;
            break;

        case PlayerController.Player.Two:
            playerNum = 1;
            break;

        case PlayerController.Player.Three:
            playerNum = 2;
            break;

        case PlayerController.Player.Four:
            playerNum = 3;
            break;
        }
        return(playerNum);
    }
Ejemplo n.º 2
0
        private void OnTriggerEnter2D(Collider2D collider)
        {
            if (isPressed)
            {
                return;
            }

            PlayerController.Player player = collider.GetComponent <PlayerController.Player>();
            if (player != null)
            {
                if (player.CheckState(PlayerController.StateLabels.IsStomping))
                {
                    StartCoroutine(Press());
                }
            }
        }
Ejemplo n.º 3
0
 public void GameOver(PlayerController.Player playerVencedor)
 {
     Time.timeScale           = 0;
     JogadorVencedorText.text = "O " + playerVencedor.ToString() + " É O VENCEDOR!";
     GameOverPanel.SetActive(true);
 }