| 1 | local v2 = require 'dokidoki.v2' |
| 2 | local blueprints = require 'blueprints' |
| 3 | |
| 4 | function update() |
| 5 | if math.random() < 0.15 then |
| 6 | game.actors.new(blueprints.debris, |
| 7 | {'transform', pos=v2(math.random() * 1024, math.random() * 768)}, |
| 8 | {'sprite', image=game.resources.debris_sprites[math.ceil(math.random(1, 3))], color={1, 1, 1, 0}}) |
| 9 | end |
| 10 | |
| 11 | if math.random() < 0.03 then |
| 12 | game.actors.new(blueprints.fish, |
| 13 | {'transform', pos=v2(math.random() * 1024, math.random() * 768)}, |
| 14 | {'sprite', image=game.resources.fish_sprites[math.ceil(math.random(1, 8))], color={1, 1, 1, 0}}) |
| 15 | end |
| 16 | end |