Exemple #1
0
 void OnHumanDestroyed(ComplexHumanGlobalEvent e)
 {
     if (_dict.TryGetValue(e.Human.Persona, out var node))
     {
         _dict.Remove(e.Human.Persona);
         _list.Remove(node);
         e.Human.Dispose();
         fire(new HumanUnregistered(e.Human));
     }
 }
Exemple #2
0
 void OnHumanCreated(ComplexHumanGlobalEvent e)
 {
     OnHumanDestroyed(e);
     _dict[e.Human.Persona] = _list.AddLast(e.Human);
     fire(new HumanRegistered(e.Human));
 }