|
|
|
|
|
|
//Adds listeners for events being triggered in the InputReader script
|
|
|
|
private void OnEnable() |
|
|
|
{ |
|
|
|
inputReader.JumpEvent += OnJumpInitiated; |
|
|
|
inputReader.jumpEvent += OnJumpInitiated; |
|
|
|
inputReader.jumpCanceledEvent += OnJumpCanceled; |
|
|
|
inputReader.moveEvent += OnMove; |
|
|
|
//...
|
|
|
|
|
|
|
private void OnDisable() |
|
|
|
{ |
|
|
|
inputReader.JumpEvent -= OnJumpInitiated; |
|
|
|
inputReader.jumpEvent -= OnJumpInitiated; |
|
|
|
inputReader.jumpCanceledEvent -= OnJumpCanceled; |
|
|
|
inputReader.moveEvent -= OnMove; |
|
|
|
//...
|
|
|
|