Sprite.corners

From MiniScript Wiki
Revision as of 23:35, 5 August 2025 by DSlower (talk | contribs) (Creating the page with a basic explanation of this property)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Contains a list with the 4 corners of the bounding box of the Sprite. It is sorted counter clockwise and starts with the bottom left corner. Index 0 is the bottom left corner, index 3 is top left corner. The Sprite.setCorners function can be used to change its value.

Example

sp = new Sprite
sp.image = file.loadImage("/sys/pics/Wumpus.png")
for c in sp.corners
   print "X: " + c[0]
   print "Y: " + c[1]
end for