Added AssaultDash and all its logic, including a doubletapkey. Doubletapkey could be made more generic.

This commit is contained in:
verysecrethero
2016-01-29 12:06:14 +01:00
parent 7408da401b
commit 7987d4b27c
2 changed files with 64 additions and 4 deletions
@@ -20,4 +20,20 @@ private:
EventRelay<PlayerMovementSystem, Events::PlayerSpawned> m_EPlayerSpawned;
bool OnPlayerSpawned(Events::PlayerSpawned& e);
double m_AssaultDashDoubleTapDeltaTime = 0.0f;
double m_AssaultDashCoolDownTimer = 0.0f;
double m_AssaultDashCoolDownMaxTimer = 3.0f;
ImGuiKey m_AssaultDashDoubleTapLastKey = ImGuiKey_Escape;
const float m_AssaultDashDoubleTapSensitivityTimer = 0.25f;
enum class AssaultDashDirection {
Left,
Right,
None
};
AssaultDashDirection m_AssaultDashTapDirection = AssaultDashDirection::None;
bool m_AssaultDashDoubleTapped = false;
bool m_PlayerIsDashing = false;
void assaultDashCheck(glm::vec3 controllerMovement, double dt, bool isJumping);
};