Beispiel #1
0
        public void RemoveEntity(AbstractEntity entity)
        {
            AbstractEntity ent = EntitiesInTheWorld.Find(a => a.BehaviourID == entity.BehaviourID);

            lock (EntitiesInTheWorld)
                EntitiesInTheWorld.Remove(ent);
            ent.Dispose();
        }
Beispiel #2
0
 public void AddEntity(AbstractEntity beh)
 {
     beh.Belongs = this;
     beh.Initialize();
     lock (EntitiesInTheWorld)
         EntitiesInTheWorld.Add(beh);
     BehaviourController.StartUpdateBehaviour(beh);
 }
Beispiel #3
0
 public override void Dispose()
 {
     EntitiesInTheWorld.ForEach((a) => a.Dispose());
     ObjectsInTheWorld.ForEach((a) => a.Dispose());
     SomethingInTheWorld.ForEach((a) => a.Dispose());
     EntitiesInTheWorld  = null;
     SomethingInTheWorld = null;
     ObjectsInTheWorld   = null;
     base.Dispose();
 }