Player Attack Input

The PlayerAttackInput class is responsible for handling the attack-related input from the player.

Properties

  • private PlayerInput playerInput: References the PlayerInput instance.

Constructor

  • public PlayerAttackInput(PlayerInput playerInput): Initializes a new instance of the PlayerAttackInput class, assigning the PlayerInput

Methods

  • public void OnUpdate(): Called every frame, calls SendAttackInput

  • private void SendAttackInput(): Processes the attack input. If the left button is pressed, it sends an attack request to the server by calling CmdPlayerAttackRequest() on player.

Last updated