public Tank(ImageList imageList, Border border, Wall wall, Kolobok kolobok, BrokenWall brokenWall, int speed) : base(imageList, border, wall, brokenWall, speed) { CreateRandomLocation(); LastPosition = new Position(CurrentPosition); Directions = Direction.RIGHT; TanksView = new TankView(imageList); kolobok.HitTankEvent += Shot_HitTankEvent; positionsOfTanks.Add(this); }
public List <TankView> AddTankViews(Panel p_Map) { List <TankView> listViewTank = new List <TankView>(); for (int i = 0; i < gameModel.listTank.Count; i++) { TankView viewTank = new TankView(p_Map); viewTank.Model = gameModel.listTank[i]; viewTank.Model.MapSize = new Point(p_Map.Width, p_Map.Height); viewTank.Subscribe(); listViewTank.Add(viewTank); } return(listViewTank); }
public PictureBox BangTank(PictureBox pictureBox, Tank tank) { TankView tankView = new TankView(); return(tankView.RemoveViewTank(tank, pictureBox)); }