This shows you the differences between two versions of the page.
en:spritepoly [2016/11/07 12:20] admin |
en:spritepoly [2020/02/28 10:46] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Spritepoly (Statement) ===== | ||
- | ==== Format ==== | ||
- | **spritepoly** // | ||
- | **spritepoly** ( // | ||
- | **spritepoly** // | ||
- | **spritepoly** ( // | ||
- | **spritepoly** // | ||
- | **spritepoly** ( // | ||
- | |||
- | ==== Description ==== | ||
- | Create a sprite from a list of points that represent a polygon. | ||
- | |||
- | One dimensional arrays and lists must have at least six values and an even number of values. | ||
- | |||
- | ==== Example ==== | ||
- | < | ||
- | # create an arrow that spins and follows the mouse | ||
- | spritedim 1 | ||
- | color darkblue, blue | ||
- | penwidth 2 | ||
- | spritepoly 0, {15,0, 30,10, 25,10, 25,30, 5,30, 5,10, 0,10} | ||
- | |||
- | color grey | ||
- | rect 0,0,300,300 | ||
- | spriteshow 0 | ||
- | s = 1 | ||
- | ds = .1 | ||
- | r = 0 | ||
- | while true | ||
- | | ||
- | r = r + .1 | ||
- | if s > 5 or s < 1 then ds = ds * -1 | ||
- | s = s + ds | ||
- | pause .1 | ||
- | end while</ | ||
- | |||
- | ==== See Also ==== | ||
- | [[Poly|Poly]], | ||
- | |||
- | ==== History ==== | ||
- | |0.9.9.70|New To Version| | ||
- | |1.99.99.55|two dimensional list support was added| | ||
- | |1.99.99.72|added required [] to passing variable array| | ||
- | |||