Изменение создания объекта в классе формы
This commit is contained in:
parent
1e83e26657
commit
17121ead6d
@ -36,8 +36,7 @@ namespace ArmoredCar
|
||||
private void ButtonCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Random rnd = new();
|
||||
_car = new DrawningArmoredCar();
|
||||
_car.Init(rnd.Next(100, 300), rnd.Next(1000, 2000),
|
||||
_car = new DrawningArmoredCar(rnd.Next(100, 300), rnd.Next(1000, 2000),
|
||||
Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)));
|
||||
_car.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxCar.Width, pictureBoxCar.Height);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user