[client] update SoundManager
This commit is contained in:
@@ -303,8 +303,8 @@ class Game extends GameDispatcher {
|
||||
private function spawnBonus(?type:BonusType):Void {
|
||||
var bonusConfig:BonusConfig = type != null ? config.getBonus(type) : config.bonuses[Math.floor(Math.random() * config.bonuses.length)];
|
||||
var bonus = new Bonus(bonusConfig);
|
||||
bonus.rect.x = Math.random() * engine.map.width;
|
||||
bonus.rect.y = Math.random() * engine.map.height;
|
||||
bonus.rect.x = Math.round(Math.random() * engine.map.width / engine.map.cellWidth) * engine.map.cellWidth;
|
||||
bonus.rect.y = Math.round(Math.random() * engine.map.height/ engine.map.cellHeight) * engine.map.cellHeight;
|
||||
engine.spawn(bonus);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user