public void CheckSpritesSalto_P2() { if (InputPlayerController.Vertical_Button_P2() > 0 && InputPlayerController.Horizontal_Button_P2() == 0 && player2.enumsPlayers.movimiento == EnumsPlayers.Movimiento.Nulo || player2.enumsPlayers.movimiento == EnumsPlayers.Movimiento.Saltar || player2.enumsPlayers.movimiento == EnumsPlayers.Movimiento.SaltoAtaque || player2.enumsPlayers.movimiento == EnumsPlayers.Movimiento.SaltoDefensa) { if (InputPlayerController.CheckPressAttackButton_P2()) { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.SaltoAtaque; } else if (InputPlayerController.CheckPressDeffenseButton_P2()) { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.SaltoDefensa; } else if (InputPlayerController.SpecialAttackButton_P2()) { //SPRITE O ANIMACION ATAQUE ESPECIAL JUGADOR. } else { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.Salto; } if (player2.enumsPlayers.movimiento == EnumsPlayers.Movimiento.Nulo) { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.Parado; } } }
public void CheckSpritesAgachado_P2() { if (InputPlayerController.Vertical_Button_P2() < 0 && player2.enumsPlayers.movimiento != EnumsPlayers.Movimiento.Saltar) { if (InputPlayerController.CheckPressAttackButton_P2()) { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.AgachadoAtaque; } else if (InputPlayerController.CheckPressDeffenseButton_P2()) { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.AgachadoDefensa; } else { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.Agachado; } } }
public void CheckSpritesParado_P2() { if (player2.enumsPlayers.movimiento != EnumsPlayers.Movimiento.Saltar && player2.enumsPlayers.movimiento != EnumsPlayers.Movimiento.Agacharse && InputPlayerController.Horizontal_Button_P2() == 0) { if (InputPlayerController.CheckPressAttackButton_P2()) { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.ParadoAtaque; } else if (InputPlayerController.CheckPressDeffenseButton_P2()) { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.ParadoDefensa; player2_PvP.playerState = Player_PvP.State.Defendido; } else { player2.spritePlayerActual.ActualSprite = SpritePlayer.SpriteActual.Parado; player2.spritePlayerActual.delaySpriteRecibirDanio = player2.spritePlayerActual.GetAuxDelaySpriteRecibirDanio(); } } }
public void CheckDeffenceButton_P2() { if (!InputPlayerController.CheckPressAttackButton_P2()) { if (InputPlayerController.CheckPressDeffenseButton_P2()) { player2.SetControllerJoystick(true); player2.Deffence(); player2.boxColliderAgachado.state = BoxColliderController.StateBoxCollider.Defendido; player2.boxColliderParado.state = BoxColliderController.StateBoxCollider.Defendido; player2.boxColliderSaltando.state = BoxColliderController.StateBoxCollider.Defendido; player2.boxColliderSprite.state = BoxColliderController.StateBoxCollider.Defendido; } else { player2.boxColliderAgachado.state = BoxColliderController.StateBoxCollider.Normal; player2.boxColliderParado.state = BoxColliderController.StateBoxCollider.Normal; player2.boxColliderSaltando.state = BoxColliderController.StateBoxCollider.Normal; player2.boxColliderSprite.state = BoxColliderController.StateBoxCollider.Normal; } } }