Пример #1
0
 /// <summary>
 /// METHOD: AddSceneList, a method which adds an entity to the scene graph
 /// </summary>
 /// <param name="e"></param>
 public void AddSceneList(IEntity e)
 {
     // CALL to Add method of the list of entities
     if (e is StaticEntity)
     {
         StaticEntities.Add(e);
     }
     else
     {
         InSceneList.Add(e);
     }
 }
Пример #2
0
        /// <summary>
        /// METHOD: RemoveSceneList, a method which removes an entity from the SceneGraph
        /// </summary>
        /// <param name="e"></param>
        public void RemoveSceneList(IEntity e)
        {
            // CALL to Remove method in the list of entities

            if (InSceneList.Contains(e))
            {
                InSceneList.Remove(e);
            }
            else if (StaticEntities.Contains(e))
            {
                StaticEntities.Remove(e);
            }
        }