Пример #1
0
 public void CheckSpritesSalto_P1()
 {
     if (InputPlayerController.Vertical_Button_P1() > 0 && InputPlayerController.Horizontal_Button_P1() == 0 && player1.enumsPlayers.movimiento == EnumsPlayers.Movimiento.Nulo || player1.enumsPlayers.movimiento == EnumsPlayers.Movimiento.Saltar || player1.enumsPlayers.movimiento == EnumsPlayers.Movimiento.SaltoAtaque || player1.enumsPlayers.movimiento == EnumsPlayers.Movimiento.SaltoDefensa)
     {
         if (InputPlayerController.CheckPressAttackButton_P1())
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.SaltoAtaque;
         }
         else if (InputPlayerController.CheckPressDeffenseButton_P1())
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.SaltoDefensa;
         }
         else if (InputPlayerController.SpecialAttackButton_P1())
         {
             //SPRITE O ANIMACION ATAQUE ESPECIAL JUGADOR.
         }
         else
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.Salto;
         }
         if (player1.enumsPlayers.movimiento == EnumsPlayers.Movimiento.Nulo)
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.Parado;
         }
     }
 }
Пример #2
0
 public void CheckSpritesAgachado_P1()
 {
     if (InputPlayerController.Vertical_Button_P1() < 0 && player1.enumsPlayers.movimiento != EnumsPlayers.Movimiento.Saltar)
     {
         if (InputPlayerController.CheckPressAttackButton_P1())
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.AgachadoAtaque;
         }
         else if (InputPlayerController.CheckPressDeffenseButton_P1())
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.AgachadoDefensa;
         }
         else
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.Agachado;
         }
     }
 }
Пример #3
0
 public void CheckDeffenceButton_P1()
 {
     if (!InputPlayerController.CheckPressAttackButton_P1())
     {
         if (InputPlayerController.CheckPressDeffenseButton_P1())
         {
             player1.SetControllerJoystick(true);
             player1.Deffence();
             player1.boxColliderAgachado.state = BoxColliderController.StateBoxCollider.Defendido;
             player1.boxColliderParado.state   = BoxColliderController.StateBoxCollider.Defendido;
             player1.boxColliderSaltando.state = BoxColliderController.StateBoxCollider.Defendido;
             player1.boxColliderSprite.state   = BoxColliderController.StateBoxCollider.Defendido;
         }
         else
         {
             player1.boxColliderAgachado.state = BoxColliderController.StateBoxCollider.Normal;
             player1.boxColliderParado.state   = BoxColliderController.StateBoxCollider.Normal;
             player1.boxColliderSaltando.state = BoxColliderController.StateBoxCollider.Normal;
             player1.boxColliderSprite.state   = BoxColliderController.StateBoxCollider.Normal;
         }
     }
 }
Пример #4
0
 public void CheckSpritesParado_P1()
 {
     if (player1.enumsPlayers.movimiento != EnumsPlayers.Movimiento.Saltar &&
         player1.enumsPlayers.movimiento != EnumsPlayers.Movimiento.Agacharse && InputPlayerController.Horizontal_Button_P1() == 0)
     {
         if (InputPlayerController.CheckPressAttackButton_P1())
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.ParadoAtaque;
         }
         else if (InputPlayerController.CheckPressDeffenseButton_P1())
         {
             player1.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.ParadoDefensa;
             if (player1_PvP != null)
             {
                 player1_PvP.playerState = Player_PvP.State.Defendido;
             }
         }
         else
         {
             player1.spritePlayerActual.ActualSprite            = SpritePlayer.SpriteActual.Parado;
             player1.spritePlayerActual.delaySpriteRecibirDanio = player1.spritePlayerActual.GetAuxDelaySpriteRecibirDanio();
         }
     }
 }