Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/Draw-a-clock/MiniScript/draw-a-clock.mini
Normal file
26
Task/Draw-a-clock/MiniScript/draw-a-clock.mini
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// draw a clock hand, then copy it to an image
|
||||
gfx.clear color.clear
|
||||
gfx.fillPoly [[60,5], [64,10], [128,5], [64,0]], color.yellow
|
||||
handImg = gfx.getImage(0,0, 128,10)
|
||||
|
||||
clear // clear all displays
|
||||
|
||||
// prepare the face sprite
|
||||
faceImg = file.loadImage("/sys/pics/shapes/CircleThinInv.png")
|
||||
face = new Sprite
|
||||
face.image = faceImg
|
||||
face.scale = 2
|
||||
face.x = 480; face.y = 320
|
||||
display(4).sprites.push face
|
||||
|
||||
// prepare the hand sprite (from previously created image)
|
||||
hand = new Sprite
|
||||
hand.image = handImg
|
||||
hand.x = face.x; hand.y = face.y
|
||||
display(4).sprites.push hand
|
||||
|
||||
// main loop
|
||||
while true
|
||||
hand.rotation = 90 - floor(time) % 60 * 6
|
||||
wait
|
||||
end while
|
||||
Loading…
Add table
Add a link
Reference in a new issue