Ejemplo n.º 1
0
        /*
         *  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);
        }
Ejemplo n.º 2
0
 private void ApplyForSystems(TinyEntity entity)
 {
     entity.ResetSystemDependencies(systems);
 }
Ejemplo n.º 3
0
        /*
         *  ============================
         *      LOCAL IMPLEMENTATION
         *  ============================
         */

        private void RemoveEntity(TinyEntity entity)
        {
            entities.Remove(entity);
        }