Лабораторная1(ФинальныйФинал)

This commit is contained in:
Макс 2025-02-20 21:31:04 +04:00
parent 5097475d5d
commit 69a8cc5ae4
3 changed files with 9 additions and 23 deletions

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Projekt;
/// <summary>
/// Направление перемещения

View File

@ -26,11 +26,11 @@ public class DrawingTank
/// <summary>
/// Ширина прорисовки танка
/// </summary>
private readonly int _drawningTankWidth = 160;
private readonly int _drawningTankWidth = 150;
/// <summary>
/// Высота прорисовки танка
/// </summary>
private readonly int _drawningTankHeight = 60;
private readonly int _drawningTankHeight = 62;
/// <summary>
/// Инициализация свойств
/// </summary>
@ -145,7 +145,7 @@ public class DrawingTank
if (_startPosY.Value + _drawningTankHeight < _pictureHeight)
{
_startPosY += (int)EntityTank.Step;
}
}
return true;
default:
return false;
@ -166,10 +166,10 @@ public class DrawingTank
//пушка
if (EntityTank.TankTurret)
{
g.FillRectangle(MainBrush, _startPosX.Value + 70, _startPosY.Value + 15, 80, 8);
g.FillRectangle(MainBrush, _startPosX.Value + 140, _startPosY.Value + 14, 10, 10);
g.FillRectangle(brWhite, _startPosX.Value + 143, _startPosY.Value + 16, 5, 2);
g.FillRectangle(brWhite, _startPosX.Value + 143, _startPosY.Value + 20, 5, 2);
g.FillRectangle(MainBrush, _startPosX.Value + 70, _startPosY.Value + 15, 70, 8);
g.FillRectangle(MainBrush, _startPosX.Value + 130, _startPosY.Value + 14, 10, 10);
g.FillRectangle(brWhite, _startPosX.Value + 133, _startPosY.Value + 16, 5, 2);
g.FillRectangle(brWhite, _startPosX.Value + 133, _startPosY.Value + 20, 5, 2);
}
//границы танка
g.FillRectangle(MainBrush, _startPosX.Value + 20, _startPosY.Value + 10, 50, 20);

View File

@ -1,13 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Projekt
{
public partial class FormTank : Form