Beispiel #1
0
 public void Remove(Fortress fortress)
 {
     fortress.RemoveModule(Module);
     foreach (ModuleLink link in Links)
     {
         link.Remove(fortress);
     }
 }
Beispiel #2
0
 public bool Add(Fortress fortress, int x, int y)
 {
     if (!fortress.AddModule(Module, x + X, y + Y))
     {
         return(false);
     }
     foreach (ModuleLink link in Links)
     {
         if (!link.Add(fortress, x, y))
         {
             fortress.RemoveModule(Module);
             return(false);
         }
     }
     return(true);
 }