From bbd11c321081eab06f1838f5fb3f98a95e72c96b Mon Sep 17 00:00:00 2001 From: prodigygirl Date: Sat, 8 Oct 2022 17:38:21 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=BA=D1=82=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BA=D0=B0=D1=80=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArmoredCar/ArmoredCar/MapWithSetArmoredCarsGeneric.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ArmoredCar/ArmoredCar/MapWithSetArmoredCarsGeneric.cs b/ArmoredCar/ArmoredCar/MapWithSetArmoredCarsGeneric.cs index 998bc13..04ee657 100644 --- a/ArmoredCar/ArmoredCar/MapWithSetArmoredCarsGeneric.cs +++ b/ArmoredCar/ArmoredCar/MapWithSetArmoredCarsGeneric.cs @@ -166,10 +166,11 @@ namespace ArmoredCar /// private void DrawArmoredCars(Graphics g) { + int width = _pictureWidth / _placeSizeWidth; + for (int i = 0; i < _setCars.Count; i++) - { - // TODO установка объекта - //_setCars.Get(i)?.SetObject(x, y, _pictureWidth, _pictureHeight); + { + _setCars.Get(i)?.SetObject(i % width * _placeSizeWidth + 10, i / width * _placeSizeHeight + 10, _pictureWidth, _pictureHeight); _setCars.Get(i)?.DrawningObject(g); } }