Merge remote-tracking branch 'origin/master' into particles
Conflicts: src/Components/Physics.h src/GameWorld.cpp src/World.cpp src/World.h vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
+9
-2
@@ -14,13 +14,16 @@
|
||||
#include "Entity.h"
|
||||
#include "Component.h"
|
||||
#include "System.h"
|
||||
#include "EventBroker.h"
|
||||
#include "ResourceManager.h"
|
||||
|
||||
class World
|
||||
{
|
||||
public:
|
||||
World();
|
||||
~World();
|
||||
World(std::shared_ptr<::EventBroker> eventBroker)
|
||||
: m_EventBroker(eventBroker)
|
||||
, m_LastEntityID(0) { }
|
||||
~World() { }
|
||||
|
||||
virtual void Initialize();
|
||||
|
||||
@@ -65,6 +68,8 @@ public:
|
||||
std::shared_ptr<Component> AddComponent(EntityID entity, std::string componentType);
|
||||
template <class T>
|
||||
T* GetComponent(EntityID entity, std::string componentType);
|
||||
// Triggers commit events in systems
|
||||
void CommitEntity(EntityID entity);
|
||||
|
||||
/*std::vector<EntityID> GetEntityChildren(EntityID entity);*/
|
||||
|
||||
@@ -75,8 +80,10 @@ public:
|
||||
std::unordered_map<EntityID, EntityID>* GetEntities() { return &m_EntityParents; }
|
||||
|
||||
ResourceManager* GetResourceManager() { return &m_ResourceManager; }
|
||||
std::shared_ptr<::EventBroker> EventBroker() { return m_EventBroker; }
|
||||
|
||||
protected:
|
||||
std::shared_ptr<::EventBroker> m_EventBroker;
|
||||
SystemFactory m_SystemFactory;
|
||||
ComponentFactory m_ComponentFactory;
|
||||
ResourceManager m_ResourceManager;
|
||||
|
||||
Reference in New Issue
Block a user