protected virtual void Finish(PositionComponent playerPos)
{
if (direction == Direction.Right)
{
playerPos.SetX(OffsetDist());
playerPos.Offset(0, NextScreenY);
}
else if (direction == Direction.Left)
{
playerPos.SetX(nextWidth - OffsetDist());
playerPos.Offset(0, NextScreenY);
}
else if (direction == Direction.Down)
{
playerPos.SetY(OffsetDist());
playerPos.Offset(NextScreenX, 0);
}
else if (direction == Direction.Up)
{
playerPos.SetY(nextHeight - OffsetDist());
playerPos.Offset(NextScreenX, 0);
}
if (ScrollDone != null)
{
ScrollDone(this);
}
}