Some Explosion stuff

This commit is contained in:
Stiffly
2014-05-30 00:12:28 +02:00
parent 571edbc214
commit d17450b554
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -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<float>() / 2, glm::vec3(1,0,0));
e.Speed = 3;
e.SpreadAngle = glm::pi<float>();
e.spritePath = "Textures/Sprites/SeriousParticle.png";
EventBroker->Publish(e);
}
// // Lock mouse while holding LMB
// if (m_CurrentMouseState[GLFW_MOUSE_BUTTON_LEFT])
// {
+1
View File
@@ -12,6 +12,7 @@
#include "Events/LockMouse.h"
#include "Events/GamepadAxis.h"
#include "Events/GamepadButton.h"
#include "Events/CreateExplosion.h"
class InputManager
{