done
This commit is contained in:
parent
93d33965fe
commit
82c3809904
@ -38,9 +38,8 @@ namespace ProjectTank.MovementStrategy
|
||||
/// <param name="moveableObject">Перемещаемый объект</param>
|
||||
/// <param name="width">Ширина поля</param>
|
||||
/// <param name="height">Высота поля</param>
|
||||
public void SetData(IMoveableObject moveableObject, int width, int
|
||||
height)
|
||||
{
|
||||
public void SetData(IMoveableObject moveableObject, int width,
|
||||
int height){
|
||||
if (moveableObject == null)
|
||||
{
|
||||
_state = Status.NotInit;
|
||||
|
@ -17,10 +17,6 @@ namespace ProjectTank.Generics
|
||||
where T : DrawningArmoredTransport
|
||||
where U : IMoveableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Коэффициент изменения ширины парковки
|
||||
/// </summary>
|
||||
readonly int koefWidth = 2;
|
||||
/// <summary>
|
||||
/// Ширина окна прорисовки
|
||||
/// </summary>
|
||||
@ -111,7 +107,7 @@ namespace ProjectTank.Generics
|
||||
private void DrawBackground(Graphics g)
|
||||
{
|
||||
Pen pen = new(Color.Black, 3);
|
||||
for (int i = 0; i < (_pictureWidth / _placeSizeWidth)/koefWidth; i++) //изменение ширины парковки
|
||||
for (int i = 0; i < (_pictureWidth / _placeSizeWidth); i++) //изменение ширины парковки
|
||||
{
|
||||
for (int j = 0; j < _pictureHeight / _placeSizeHeight + 1; ++j)
|
||||
{
|
||||
@ -132,7 +128,7 @@ namespace ProjectTank.Generics
|
||||
/// <param name="g"></param>
|
||||
private void DrawObjects(Graphics g)
|
||||
{
|
||||
int width = (_pictureWidth / _placeSizeWidth)/koefWidth; //изменение ширины парковки
|
||||
int width = (_pictureWidth / _placeSizeWidth);
|
||||
int height = _pictureHeight / _placeSizeHeight;
|
||||
for (int i = 0; i < _collection.Count; i++)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ using ProjectTank.DrawningObjects;
|
||||
namespace ProjectTank.MovementStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Реализация интерфейса IDrawningObject для работы с объектом DrawningCar(паттерн Adapter)
|
||||
/// Реализация интерфейса IDrawningObject для работы с объектом DrawningArmoredTransport(паттерн Adapter)
|
||||
/// </summary>
|
||||
public class DrawningObjectArmoredTransport : IMoveableObject
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user