Skip to content

Instantly share code, notes, and snippets.

@Kaiochao
Created June 3, 2017 01:08
Show Gist options
  • Save Kaiochao/c341369c14f459c54db6756b80b669a6 to your computer and use it in GitHub Desktop.
Save Kaiochao/c341369c14f459c54db6756b80b669a6 to your computer and use it in GitHub Desktop.
BYOND Pixel Positions
atom
proc
Width()
return TileWidth
Height()
return TileHeight
LowerX()
return (x - 1) * TileWidth
LowerY()
return (y - 1) * TileHeight
CenterX()
return LowerX() + Width() / 2
CenterY()
return LowerY() + Height() / 2
movable
Width()
return bound_width
Height()
return bound_height
LowerX()
return ..() + bound_x + step_x
LowerY()
return ..() + bound_y + step_y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment