Extra spaces were removed.
This commit is contained in:
parent
58305e652e
commit
1992b7d08d
@ -31,7 +31,6 @@ public abstract class AbstractMap
|
|||||||
GenerateMap();
|
GenerateMap();
|
||||||
}
|
}
|
||||||
return DrawMapWithObject();
|
return DrawMapWithObject();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Image MoveObject(Direction direction)
|
public Image MoveObject(Direction direction)
|
||||||
@ -43,8 +42,6 @@ public abstract class AbstractMap
|
|||||||
//COLLISION CHECK
|
//COLLISION CHECK
|
||||||
if (direction == Direction.Up)
|
if (direction == Direction.Up)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < _map.length; i++)
|
for (int i = 0; i < _map.length; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < _map[i].length; j++)
|
for (int j = 0; j < _map[i].length; j++)
|
||||||
@ -53,9 +50,6 @@ public abstract class AbstractMap
|
|||||||
{
|
{
|
||||||
Point LeftTop = new Point((int)_drawingObject.getCurrentPosition().Left(), (int)(_drawingObject.getCurrentPosition().Top() - _drawingObject.getStep()));
|
Point LeftTop = new Point((int)_drawingObject.getCurrentPosition().Left(), (int)(_drawingObject.getCurrentPosition().Top() - _drawingObject.getStep()));
|
||||||
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
|
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle rectBarrier = new Rectangle((int)(i * _size_x), (int)(j * _size_y), (int)_size_x, (int)_size_y);
|
Rectangle rectBarrier = new Rectangle((int)(i * _size_x), (int)(j * _size_y), (int)_size_x, (int)_size_y);
|
||||||
|
|
||||||
if (objectRect.intersects(rectBarrier))
|
if (objectRect.intersects(rectBarrier))
|
||||||
@ -96,7 +90,6 @@ public abstract class AbstractMap
|
|||||||
{
|
{
|
||||||
if (_map[i][j] == _barrier)
|
if (_map[i][j] == _barrier)
|
||||||
{
|
{
|
||||||
|
|
||||||
Point LeftTop = new Point((int)(_drawingObject.getCurrentPosition().Left() - _drawingObject.getStep()), (int)_drawingObject.getCurrentPosition().Top());
|
Point LeftTop = new Point((int)(_drawingObject.getCurrentPosition().Left() - _drawingObject.getStep()), (int)_drawingObject.getCurrentPosition().Top());
|
||||||
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
|
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
|
||||||
|
|
||||||
@ -121,12 +114,8 @@ public abstract class AbstractMap
|
|||||||
{
|
{
|
||||||
Point LeftTop = new Point((int)(_drawingObject.getCurrentPosition().Left() + _drawingObject.getStep()), (int)_drawingObject.getCurrentPosition().Top());
|
Point LeftTop = new Point((int)(_drawingObject.getCurrentPosition().Left() + _drawingObject.getStep()), (int)_drawingObject.getCurrentPosition().Top());
|
||||||
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
|
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle rectBarrier = new Rectangle((int)(i * _size_x), (int)(j * _size_y), (int)_size_x, (int)_size_y);
|
Rectangle rectBarrier = new Rectangle((int)(i * _size_x), (int)(j * _size_y), (int)_size_x, (int)_size_y);
|
||||||
|
|
||||||
|
|
||||||
if (objectRect.intersects(rectBarrier))
|
if (objectRect.intersects(rectBarrier))
|
||||||
{
|
{
|
||||||
CollisionFlag = 1;
|
CollisionFlag = 1;
|
||||||
@ -171,7 +160,6 @@ public abstract class AbstractMap
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,8 +194,6 @@ public abstract class AbstractMap
|
|||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected abstract void GenerateMap();
|
protected abstract void GenerateMap();
|
||||||
|
|
||||||
protected abstract void DrawRoadPart(Graphics g, int i, int j);
|
protected abstract void DrawRoadPart(Graphics g, int i, int j);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user