aboutsummaryrefslogtreecommitdiffstats
path: root/src/script.cpp
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-07 01:24:15 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-07 01:24:15 -0400
commit2417abe35038e903bf63d996ae6252173aa878a2 (patch)
tree38722a150bf08803d87157df37605127332d1b79 /src/script.cpp
parentc9f8936fcb1afb07ead095f5c560473dc97eb3f6 (diff)
Removed EntityX pointers from script system and replaced with references
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/script.cpp b/src/script.cpp
index e1dea6a..a6f0968 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -24,12 +24,9 @@
* SYSTEM SPECIFIC *
*********************/
-void ScriptSystem::configure(entityx::EntityManager& entities,
- entityx::EventManager& events)
+void ScriptSystem::configure([[maybe_unused]] entityx::EntityManager& entities,
+ [[maybe_unused]] entityx::EventManager& events)
{
- this->manager = &entities;
- this->events = &events;
-
events.subscribe<EntitySpawnEvent>(*this);
// Init after systems.configure() in engine.cpp
@@ -137,7 +134,7 @@ sol::table ScriptSystem::spawn(sol::object param)
if (param.get_type() == sol::type::table) {
sol::table tab = param; // Cast the generic parameter to a table
- entityx::Entity e = manager->create(); // Create a new entity
+ entityx::Entity e = manager.create(); // Create a new entity
auto d = e.assign<Scripted>().get(); // Since this entity was created
// via Lua, assign the Scripted
// component.