26 lines
648 B
C#
26 lines
648 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Encompass {
|
|
public class World {
|
|
EntityManager entityManager;
|
|
ComponentManager componentManager;
|
|
|
|
public World() {
|
|
this.componentManager = new ComponentManager();
|
|
this.entityManager = new EntityManager(componentManager);
|
|
}
|
|
|
|
public void Update() {
|
|
entityManager.DestroyMarkedEntities();
|
|
componentManager.ActivateComponents();
|
|
componentManager.RemoveComponents();
|
|
|
|
}
|
|
|
|
public Entity CreateEntity() {
|
|
return entityManager.CreateEntity();
|
|
}
|
|
}
|
|
}
|