aboutsummaryrefslogtreecommitdiffstats
path: root/entityx/System.cc
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-01-10 21:26:13 -0500
committerClyne Sullivan <tullivan99@gmail.com>2017-01-10 21:26:13 -0500
commitf800dbc034e7a70a613bab8cd9d147be4f6e88b6 (patch)
treec8714ddc8f6712f07d921c08fd92ae8ef228494b /entityx/System.cc
parentc6651145a4a6e6611b585c1a87c127f38751db4b (diff)
windows build
Diffstat (limited to 'entityx/System.cc')
-rw-r--r--entityx/System.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/entityx/System.cc b/entityx/System.cc
new file mode 100644
index 0000000..8e4b5a9
--- /dev/null
+++ b/entityx/System.cc
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Alec Thomas <alec@swapoff.org>
+ * All rights reserved.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.
+ *
+ * Author: Alec Thomas <alec@swapoff.org>
+ */
+
+#include "entityx/System.h"
+
+namespace entityx {
+
+BaseSystem::Family BaseSystem::family_counter_;
+
+BaseSystem::~BaseSystem() {
+}
+
+void SystemManager::update_all(TimeDelta dt) {
+ assert(initialized_ && "SystemManager::configure() not called");
+ for (auto &pair : systems_) {
+ pair.second->update(entity_manager_, event_manager_, dt);
+ }
+}
+
+void SystemManager::configure() {
+ for (auto &pair : systems_) {
+ pair.second->configure(entity_manager_, event_manager_);
+ }
+ initialized_ = true;
+}
+
+} // namespace entityx