Example #1
0
 public void RemoveRootEntity(IEntity root)
 {
     if (m_rootEntities.Contains(root))
     {
         SytemActionBus.Signal <EndEvent, EntityEvent>(new EntityEvent(root));
         m_rootEntities.Remove(root);
     }
     throw new Exception("Could not find root entity to remove");
 }
Example #2
0
 // adding a root object will automatically call "on start" to all entities
 public void AddRootEntity(IEntity root)
 {
     if (m_rootEntities.Contains(root))
     {
         throw new Exception("Already contains the root entity");
     }
     SytemActionBus.Signal <StartEvent, EntityEvent>(new EntityEvent(root));
     m_rootEntities.Add(root);
 }