/* * Create a new entity and add it to the list of entities * you cannot create entities by instantiating them yourself, this ECSmanager has therefore been designed * to keep users for doing so. * The only way to create new entities is by using this methode. * * @returns the interface ITinyEntity of the newly created instance of an entity. */ public ITinyEntity CreateEntity() { TinyEntity entity = new TinyEntity(ApplyForSystems, RemoveEntity); entities.Add(entity); return(entity); }
private void ApplyForSystems(TinyEntity entity) { entity.ResetSystemDependencies(systems); }
/* * ============================ * LOCAL IMPLEMENTATION * ============================ */ private void RemoveEntity(TinyEntity entity) { entities.Remove(entity); }