HACK: Added Activate button for spawners in editor. Right now it includes the event from Game, but SpawnerSystem should probably be moved to Engine.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "../Core/ELockMouse.h"
|
||||
#include "../Core/EFileDropped.h"
|
||||
#include "../Rendering/Texture.h"
|
||||
#include "Game/Events/ESpawnerSpawn.h"
|
||||
|
||||
class EditorGUI
|
||||
{
|
||||
|
||||
@@ -338,6 +338,15 @@ bool EditorGUI::drawComponentNode(EntityWrapper entity, const ComponentInfo& ci)
|
||||
}
|
||||
}
|
||||
|
||||
if (ci.Name == "Spawner") {
|
||||
if (ImGui::Button("Activate")) {
|
||||
Events::SpawnerSpawn e;
|
||||
e.Spawner = entity;
|
||||
e.Parent = entity;
|
||||
m_EventBroker->Publish(e);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user