зафиксировать
This commit is contained in:
parent
646780ae8a
commit
9f19a61ae6
@ -1,15 +0,0 @@
|
|||||||
using ProjectBoat_bae.DrawningObjects;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ProjectBoat_bae
|
|
||||||
{
|
|
||||||
internal class BoatDelegate
|
|
||||||
{
|
|
||||||
// Делегат для передачи объекта
|
|
||||||
public delegate void boatDelegate(Drawningboat boat);
|
|
||||||
}
|
|
||||||
}
|
|
@ -74,13 +74,13 @@ namespace ProjectBoat_bae.DrawningObjects
|
|||||||
// Установка позиции
|
// Установка позиции
|
||||||
public void SetPosition(int x, int y)
|
public void SetPosition(int x, int y)
|
||||||
{
|
{
|
||||||
if (x < 0 || x + _boatWidth > _pictureWidth + 90)
|
if (x < 0 || x + _boatWidth > _pictureWidth)
|
||||||
{
|
{
|
||||||
x = Math.Max(0, _pictureWidth - _boatWidth);
|
x = Math.Max(0, _pictureWidth - _boatWidth + 90);
|
||||||
}
|
}
|
||||||
if (y < 0 || y + _boatHeight > _pictureHeight + 60)
|
if (y < 0 || y + _boatHeight > _pictureHeight)
|
||||||
{
|
{
|
||||||
y = Math.Max(0, _pictureHeight - _boatHeight);
|
y = Math.Max(0, _pictureHeight - _boatHeight+ 90);
|
||||||
}
|
}
|
||||||
_startPosX = x;
|
_startPosX = x;
|
||||||
_startPosY = y;
|
_startPosY = y;
|
||||||
|
Loading…
Reference in New Issue
Block a user