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; }
internal override VisibleObject Copy(VisibleObject parent) { Mine mine = new Mine(Cell, (Team)parent); mine.activate(); return mine; }