examples

ui-progress.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//display.rect(650, 50, 200, 25)

pb = ui.progress(150, 50, 200, 25)
pb.progressColor = color.hsb(168, 92, 92)

let up = false
let i = 1.0
timer.every(10, () => {
  if (i <= 0.0) up = true
  if (i >= 1.0) up = false
  
  if (up) { 
    i += 0.01
  } else {
    i -= 0.01
  }
  
  pb.progress = i
})


times(100, () => {
  display.star(random.pos(), 2)
})