Лабораторная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; namespace Projekt;
/// <summary> /// <summary>
/// Направление перемещения /// Направление перемещения

View File

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