diff --git a/src/InputManager.cpp b/src/InputManager.cpp index b20e072..11f21d7 100644 --- a/src/InputManager.cpp +++ b/src/InputManager.cpp @@ -85,6 +85,20 @@ void InputManager::Update(double dt) EventBroker->Publish(e); } + if(m_CurrentKeyState[GLFW_KEY_B]) + { + Events::CreateExplosion e; + e.LifeTime = 1; + e.ParticleScale = 6; + e.ParticlesToSpawn = 50; + e.Position = glm::vec3(0, -20, 40); + e.RelativeUpOrientation = glm::angleAxis(glm::pi() / 2, glm::vec3(1,0,0)); + e.Speed = 3; + e.SpreadAngle = glm::pi(); + e.spritePath = "Textures/Sprites/SeriousParticle.png"; + EventBroker->Publish(e); + } + // // Lock mouse while holding LMB // if (m_CurrentMouseState[GLFW_MOUSE_BUTTON_LEFT]) // { diff --git a/src/InputManager.h b/src/InputManager.h index 69827ba..94d178d 100644 --- a/src/InputManager.h +++ b/src/InputManager.h @@ -12,6 +12,7 @@ #include "Events/LockMouse.h" #include "Events/GamepadAxis.h" #include "Events/GamepadButton.h" +#include "Events/CreateExplosion.h" class InputManager {