Klasse ShootingAnimationState

java.lang.Object
pp.battleship.game.client.ShootingAnimationState

public class ShootingAnimationState extends Object
This class represents the client state during a shooting animation. It handles the logic for the animation of a fired shell and ensures that the client notifies the server when the animation is complete.
  • Methodendetails

    • showBattle

      public boolean showBattle()
      Indicates that the battle scene should be shown in this state.
      Gibt zurück:
      true because the battle view is active during the shooting animation
    • update

      public void update(float deltaTime)
      Called once per frame to update the shell's position and check if it has reached the target. If the shell reaches the target, a message is sent to the server.
      Parameter:
      deltaTime - time in seconds since the last update call