wobblyhead hg > minor_monsters
comparison game/js/game.js @ 36:a464bd43b76c 1.0.0
clean documentation rewrite
| author | ark |
|---|---|
| date | 2026-10-21 22:34 +0200 |
| parents | 85d23328a215 |
| children |
comparison
equal
deleted
inserted
replaced
| 35:0d40f346059c | 36:a464bd43b76c |
|---|---|
| 149 return; | 149 return; |
| 150 } | 150 } |
| 151 m.alive = false; | 151 m.alive = false; |
| 152 MM.audio.play(m.boss ? "boss_die" : "monster_die"); | 152 MM.audio.play(m.boss ? "boss_die" : "monster_die"); |
| 153 this.puffs.push({ x: m.x, y: m.y, boss: m.boss, t: 0 }); | 153 this.puffs.push({ x: m.x, y: m.y, boss: m.boss, t: 0 }); |
| 154 // coins count at once; the flying coins only show it (balance.md) | 154 // coins count at once; the flying coins only show it (game.md, coins) |
| 155 this.coins += m.coins; | 155 this.coins += m.coins; |
| 156 var n = Math.min(m.coins, cfg.coins.max_sprites); | 156 var n = Math.min(m.coins, cfg.coins.max_sprites); |
| 157 for (var i = 0; i < n; i++) { | 157 for (var i = 0; i < n; i++) { |
| 158 this.flight(m.x + (this.random() - 0.5) * m.w, | 158 this.flight(m.x + (this.random() - 0.5) * m.w, |
| 159 m.y - m.h / 2 + (this.random() - 0.5) * m.h / 2, i); | 159 m.y - m.h / 2 + (this.random() - 0.5) * m.h / 2, i); |
