Пример #1
0
 void HandleVisageGangsterAdded(GangsterVisage _gangster)
 {
     var gg = new GhostGangster(_gangster);
     Console.WriteLine("adding gster w id: {0}", _gangster.id);
     gsters[gg.Id] = gg;
     m_house.AddDrawable(gg);
     m_house.AddUpdateable(gg);
 }
Пример #2
0
 void HandleVisageGangsterRemoved(GangsterVisage _gangster)
 {
     GhostGangster gg;
     if (gsters.TryGetValue(_gangster.id, out gg)) {
         m_house.RemoveDrawable(gg);
         Console.WriteLine("removed a g pic, id {0}",_gangster.id);
     } else {
         Console.WriteLine("couldnt remove a g pic, id {0}",_gangster.id);
         Console.WriteLine("# gsters: {0}, ids:",gsters.Count);
         foreach (var kvp in gsters) {
             Console.Write("{0}, ", kvp.Key);
         }
         Console.WriteLine();
     }
 }
Пример #3
0
 public void RemoveGangster(GangsterVisage _gangster)
 {
     gangsters.Remove(_gangster);
     GangsterRemoved.Raise(_gangster);
 }
Пример #4
0
 public void AddGangster(GangsterVisage _gangster)
 {
     gangsters.Add(_gangster);
     GangsterAdded.Raise(_gangster);
 }