Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REBOL [title: "Meteor Shower"]
- alert "Left arrow moves character left! Right arrow moves character right!"
- random/seed now/time speed: 5 score: 0
- view center-face layout [
- size 600x440 backdrop reblue across
- at 270x0 text "SCORE:" t: text bold 100 (form score)
- at 280x20 y: btn 50x20 64.64.64
- at 280x420 z: btn 50x20 green
- key keycode [left] [z/offset: z/offset - 10x0 show z]
- key keycode [right] [z/offset: z/offset + 10x0 show z]
- box 0x0 rate 0 feel [engage: func [f a e] [if a = 'time [
- y/offset: y/offset + (as-pair 0 speed) show y
- if y/offset/2 > 440 [
- y/offset: as-pair (random 550) 20 show y
- score: score + 5
- speed: speed + 1
- if speed > 10 [
- speed: speed - 1
- ]
- if within? z/offset (y/offset - 50x0) 100x20 [
- y/offset: as-pair (random 550) 20 show y
- score: score - 5
- speed: speed - 1
- ]
- t/text: (form score) show t
- ]]]]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement