Class Punch
This class handles the punching mechanic for the player, including triggering animations, enabling and disabling the hurtbox, and managing player speed during a punch.
Inheritance
object
Punch
Namespace: Player
Assembly: cs.temp.dll.dll
Syntax
public class Punch : MonoBehaviour
Fields
cancelable
Determines whether the player can cancel their punch action.
Declaration
public bool cancelable
Field Value
| Type | Description |
|---|---|
| bool |
Methods
DisableCancellation()
Disables the ability to cancel the punch action.
Declaration
public void DisableCancellation()
DisableHurtbox()
Disables the hurtbox, preventing the punch from interacting with other objects.
Declaration
public void DisableHurtbox()
EnableCancellation()
Enables the ability to cancel the punch action.
Declaration
public void EnableCancellation()
EnableHurtbox()
Enables the hurtbox, allowing the punch to interact with other objects.
Declaration
public void EnableHurtbox()
ReturnToMaxSpeed()
Resets the player's movement speed to its maximum value after the punch is complete.
Declaration
public void ReturnToMaxSpeed()