2019-06-14 03:28:26 +00:00
|
|
|
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() {
|
2019-06-14 05:25:05 +00:00
|
|
|
entityManager.DestroyMarkedEntities();
|
2019-06-14 03:28:26 +00:00
|
|
|
componentManager.ActivateComponents();
|
|
|
|
componentManager.RemoveComponents();
|
2019-06-14 05:25:05 +00:00
|
|
|
|
2019-06-14 03:28:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public Entity CreateEntity() {
|
|
|
|
return entityManager.CreateEntity();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|