UnityToolbox
Brief documentation for all existing scripts.
 
Loading...
Searching...
No Matches
PlayerEventManager Class Reference
Inheritance diagram for PlayerEventManager:
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 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 PlayerEventManager.Attack ( )

References OnAttack.

◆ LockMove()

void PlayerEventManager.LockMove ( bool  locked)
Parameters
locked

References OnLockMove.

◆ Move()

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

References OnMove.

Event Documentation

◆ OnAttack

Action PlayerEventManager.OnAttack

Referenced by Attack().

◆ OnLockMove

Action<bool> PlayerEventManager.OnLockMove

Referenced by LockMove().

◆ OnMove

Action<Vector3, MovementState> PlayerEventManager.OnMove

Referenced by Move().