public override void DrawMe() { if (InteractButton.IsClicked() || _controlManager.GetAxisUp("Interact")) { _maestro.PlayOneShot(ButtonSound); CanActivate = false; SetVisibility(false); _dialogueController.PresentEntityText(_entityText); } }
private void GetInput() { CheckWeaponFire(); float walkAmount = _controls.GetAxis(WalkAxis); float strafeAmount = _controls.GetAxis(StrafeAxis); PlanarMotion = new Vector3(strafeAmount, 0, walkAmount); _movement.ProcessPlanarMovement(PlanarMotion); bool jumpPressed = _controls.GetAxisDown(JumpAxis); bool jumpHeld = (_controls.GetAxis(JumpAxis) > 0.0f) && !jumpPressed; bool jumpReleased = _controls.GetAxisUp(JumpAxis); if (jumpPressed && !_movement.IsJumping && JumpCount > 0 && JumpLockout.CanAttempt()) { _movement.PerformJump(); JumpCount--; JumpLockout.NoteLastOccurrence(); } if (jumpHeld && _movement.IsJumping) { _movement.PerformJump(); } if (jumpReleased && _movement.IsJumping) { _movement.AbortJump(); } //result = PlayerActionStates.Idle; //if (walkAmount > 0) // result = PlayerActionStates.Walk; //else if (walkAmount < 0) // result = PlayerActionStates.Backstep; //if (strafeAmount > 0) // result = PlayerActionStates.StrafeRight; //else if (strafeAmount < 0) // result = PlayerActionStates.StrafeLeft; }