/// <summary> /// Listen to keyboard and handle it /// </summary> void ListenKeyboard() { if (Input.GetKey(KeyCode.A)) { _state.ActionMove(true); } if (Input.GetKey(KeyCode.D)) { _state.ActionMove(false); } if (Input.GetKeyDown(KeyCode.Space)) { _state.ActionJump(); } if (Input.GetKeyDown(KeyCode.E)) { if (_isTouchingResource) { _state.ActionStartPick(); } } if (Input.GetKeyUp(KeyCode.E)) { _state.ActionStopPick(); } if (Input.GetKeyDown(KeyCode.Q)) { AddBuff(Buff.BuffType.slow, 1); } }