Esempio n. 1
0
        /// <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);
            }
        }
Esempio n. 2
0
        /// <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);
            }
        }