Some rephrasing
This commit is contained in:
@@ -39,7 +39,7 @@ namespace DepthsBelow.Component
|
||||
|
||||
public Vector2 ToScreen()
|
||||
{
|
||||
return Grid.GridToScreen(Position);
|
||||
return Grid.GridToWorld(Position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace DepthsBelow.Component
|
||||
|
||||
public Point ToGrid()
|
||||
{
|
||||
return Grid.ScreenToGrid(Position);
|
||||
return Grid.WorldToGrid(Position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,12 @@ namespace DepthsBelow
|
||||
{
|
||||
public const int TileSize = 32;
|
||||
|
||||
public static Vector2 GridToScreen(Point gridPos)
|
||||
public static Vector2 GridToWorld(Point gridPos)
|
||||
{
|
||||
return new Vector2(gridPos.X * TileSize, gridPos.Y * TileSize);
|
||||
}
|
||||
|
||||
public static Point ScreenToGrid(Vector2 screenPos)
|
||||
public static Point WorldToGrid(Vector2 screenPos)
|
||||
{
|
||||
return new Point(
|
||||
(int)Math.Floor(screenPos.X / TileSize),
|
||||
|
||||
Reference in New Issue
Block a user