public void DeregisterActor(IActor actor) { Console.WriteLine($"Deregister actor {actor.actorId}"); if (actor.ParentActorId != 0) { Console.WriteLine($"Check parent {actor.ParentActorId}"); IActor parent = GetActor(actor.ParentActorId); // parent might have been removed... if (parent != null) { parent.ChildActorRemoved(actor.actorId); } } _ents.Remove(actor.actorId); }