/// <summary> /// Add an entity /// </summary> /// <param name="entity"></param> public void Add(Entity entity) { if (!entity.Initialized) { entity.Initialize(contentManager, graphicsDevice); } entities.Add(entity); if (entity is AnimatedEntity) { animatedEntities.Add((AnimatedEntity)entity); } }
/// <summary> /// Remove an entity /// </summary> /// <param name="entity"></param> public void Remove(Entity entity) { entities.Remove(entity); if (entity is AnimatedEntity) { animatedEntities.Remove((AnimatedEntity)entity); } }