Skip to content

Instantly share code, notes, and snippets.

@OutlawGameTools
Created July 2, 2016 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OutlawGameTools/0e4852cd99605b0eb30c66f8f1d9c3d2 to your computer and use it in GitHub Desktop.
Save OutlawGameTools/0e4852cd99605b0eb30c66f8f1d9c3d2 to your computer and use it in GitHub Desktop.
GetWorldPosition -- pass in col # and row # and get back a position for that cell.
Vector2 GetWorldPosition(int col, int row)
{
return new Vector2 (transform.position.x - numCols/2.0f + col, transform.position.y + numRows/2.0f - row);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment