Refactored existing systems to register their own components and resource types.

This commit is contained in:
2014-04-13 16:41:35 +02:00
parent e4e5068727
commit 062242ab8e
14 changed files with 183 additions and 131 deletions
+3 -3
View File
@@ -2,9 +2,9 @@
#include "FreeSteeringSystem.h"
#include "World.h"
Systems::FreeSteeringSystem::FreeSteeringSystem(World* world) : System(world)
void Systems::FreeSteeringSystem::RegisterComponents(ComponentFactory* cf)
{
cf->Register("FreeSteering", []() { return new Components::FreeSteering(); });
}
void Systems::FreeSteeringSystem::Update(double dt)
@@ -68,4 +68,4 @@ void Systems::FreeSteeringSystem::UpdateEntity(double dt, EntityID entity, Entit
// TOUCHING THIS CODE MIGHT CAUSE THE UNIVERSE TO IMPLODE, ALSO DRAGONS
}
}
}
}