Exemple #1
0
        public void RemoveObject(AbstractObject @object)
        {
            AbstractObject obj = ObjectsInTheWorld.Find(a => a.BehaviourID == @object.BehaviourID);

            lock (ObjectsInTheWorld)
                ObjectsInTheWorld.Remove(obj);
            obj.Dispose();
        }
Exemple #2
0
 public void AddObject(AbstractObject beh)
 {
     beh.Belongs = this;
     beh.Initialize();
     lock (ObjectsInTheWorld)
         ObjectsInTheWorld.Add(beh);
     BehaviourController.StartUpdateBehaviour(beh);
 }
Exemple #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();
 }