Player Attack Input
The PlayerAttackInput
class is responsible for handling the attack-related input from the player.
Properties
private PlayerInput playerInput
: References thePlayerInput
instance.
Constructor
public PlayerAttackInput(PlayerInput playerInput)
: Initializes a new instance of thePlayerAttackInput
class, assigning thePlayerInput
Methods
public void OnUpdate()
: Called every frame, callsSendAttackInput
private void SendAttackInput()
: Processes the attack input. If the left button is pressed, it sends an attack request to the server by callingCmdPlayerAttackRequest()
on player.
Last updated