Added librarys and test application

This commit is contained in:
Gulum
2017-10-22 14:26:55 +02:00
parent 7e0c0d8a6c
commit ac45f1f944
206 changed files with 68009 additions and 13 deletions

34
include/entityx/System.cc Normal file
View File

@@ -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