UnityToolbox
Brief documentation for all existing scripts.
 
Loading...
Searching...
No Matches
UnityToolbox.PlayerControls.PlayerEventManager Class Reference
Inheritance diagram for UnityToolbox.PlayerControls.PlayerEventManager:
UnityToolbox.General.Management.Module

Public Member Functions

void Move (Vector3 currentVelocity, MovementState state)
 Should be called for each movement update of the player.
 
void LockMove (bool locked)
 Should be called to (un)lock player movement.
 
void Attack ()
 Should be called on player attacks.
 
- Public Member Functions inherited from UnityToolbox.General.Management.Module
virtual void Awake ()
 

Events

Action< Vector3, MovementStateOnMove
 An event which gives updates about the current velocity and movement state of the player. MovementState.Moving does not mean the velocity is > 0!
 
Action< bool > OnLockMove
 An event which is called once the player movement should be (un)locked.
 
Action OnAttack
 An event which is called once the player is attacking.
 

Member Function Documentation

◆ Attack()

void UnityToolbox.PlayerControls.PlayerEventManager.Attack ( )

◆ LockMove()

void UnityToolbox.PlayerControls.PlayerEventManager.LockMove ( bool  locked)

◆ Move()

void UnityToolbox.PlayerControls.PlayerEventManager.Move ( Vector3  currentVelocity,
MovementState  state 
)
Parameters
currentVelocityThe players velocity
stateThe current state.

References UnityToolbox.PlayerControls.PlayerEventManager.OnMove.

Event Documentation

◆ OnAttack

Action UnityToolbox.PlayerControls.PlayerEventManager.OnAttack

◆ OnLockMove

Action<bool> UnityToolbox.PlayerControls.PlayerEventManager.OnLockMove

◆ OnMove

Action<Vector3, MovementState> UnityToolbox.PlayerControls.PlayerEventManager.OnMove