Difference between revisions of "Sprite.corners"

From MiniScript Wiki
Jump to navigation Jump to search
(Creating the page with a basic explanation of this property)
 
(No difference)

Latest revision as of 23:35, 5 August 2025

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