Ejemplo n.º 1
0
 public override bool execute(GameTime gameTime)
 {
     Submarine sub = Entity as Submarine;
     if ((sub.Cell.Type == CellType.SHALLOW) && (sub.placeMine()))
     {
         sub.Team.placedMines++;
         Mine mine = new Mine(sub);
         sub.Parent.addToCollection(mine);
         ActivateMine act = new ActivateMine(mine, ActionsQueue);
         act.setSubs(((EntityCollection)sub.Team.Parent).getSubmarines());
         ActionsQueue.addAction(act);
     }
     return true;
 }
Ejemplo n.º 2
0
 internal override VisibleObject Copy(VisibleObject parent)
 {
     Mine mine = new Mine(Cell, (Team)parent);
     mine.activate();
     return mine;
 }