Exemplo n.º 1
0
 public void removeActor(CActor actor, bool nextCycle = false)
 {
     if (!nextCycle)
     {
         if (actor == root)
         {
             _killMe = true;
             enabled = false;
         }
         else
         {
             try
             {
                 actors.Remove(actor.name);
                 actor.component = null;
                 Map.CMapManager.removeFromActorRegistry(actor);
                 actor.Dispose();
             }
             catch (KeyNotFoundException) { }
         }
     }
     else
     {
         _removeThese.Add(actor);
     }
 }
Exemplo n.º 2
0
        private void _disposeActors()
        {
            root.Dispose();
            root = null;

            foreach (KeyValuePair <string, CActor> kvp in actors)
            {
                kvp.Value.Dispose();
            }

            actors.Clear();
        }