Cleaning game.cpp removing old test code.
Created static mesh entity Created debug bar
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <Entity/EntityManager.h>
|
||||
|
||||
#include <Entity/Entity.h>
|
||||
#include <Graphics/MeshRenderer.h>
|
||||
|
||||
EntityID EntityManager::ID = 0;
|
||||
|
||||
@@ -29,3 +30,14 @@ void RegisterEntity(EntityManager& /*manager*/, Entity* entity)
|
||||
{
|
||||
entity->ID = EntityManager::ID++;
|
||||
}
|
||||
|
||||
void UpdateEntityManager(EntityManager& manager)
|
||||
{
|
||||
for (Entity& ent : manager.Entities)
|
||||
{
|
||||
if (ent.MeshInstance != indexMax)
|
||||
{
|
||||
Juliet::SetMeshInstanceTransform(ent.MeshInstance, Juliet::MatrixTranslation(ent.X, ent.Y, 0.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,3 +21,4 @@ void InitEntityManager(Juliet::NonNullPtr<World> world);
|
||||
void ShutdownEntityManager();
|
||||
EntityManager& GetEntityManager();
|
||||
void RegisterEntity(EntityManager& manager, Entity* entity);
|
||||
void UpdateEntityManager(EntityManager& manager);
|
||||
|
||||
Reference in New Issue
Block a user