public void OnAddedToEntity() { _moveComponent = Entity.GetComponent <MoveComponent>(); _jumpComponent = Entity.GetComponent <JumpComponent>(); YetiGame.InputManager.RegisterInputEvent("MoveLeft", () => _moveComponent.SetMoveDirection(-1, 0), InputEventType.Held); YetiGame.InputManager.RegisterInputEvent("MoveRight", () => _moveComponent.SetMoveDirection(1, 0), InputEventType.Held); YetiGame.InputManager.RegisterInputEvent("MoveLeft", () => _moveComponent.SetMoveDirection(0, 0), InputEventType.Released); YetiGame.InputManager.RegisterInputEvent("MoveRight", () => _moveComponent.SetMoveDirection(0, 0), InputEventType.Released); YetiGame.InputManager.RegisterInputEvent("Jump", () => _jumpComponent.BeginJump()); }
public void OnAddedToEntity() { _moveComponent = Entity.GetComponent <MoveComponent>(); _jumpComponent = Entity.GetComponent <JumpComponent>(); }