[server] update
This commit is contained in:
@@ -4,6 +4,16 @@ import ru.m.tankz.config.Config;
|
||||
import ru.m.tankz.Type;
|
||||
|
||||
|
||||
typedef ConfigSource = {
|
||||
var game:GameConfig;
|
||||
var map: MapConfig;
|
||||
var bricks: Array<BrickConfig>;
|
||||
var presets: Array<GamePreset>;
|
||||
var points: Array<SpawnPoint>;
|
||||
var tanks: Array<TankConfig>;
|
||||
var bonuses: Array<BonusConfig>;
|
||||
}
|
||||
|
||||
interface IConfigBundle {
|
||||
public function get(type:GameType):Config;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import ru.m.tankz.game.Player;
|
||||
|
||||
class NoneControlFactory implements IControlFactory {
|
||||
|
||||
public function new() {}
|
||||
|
||||
public function build(player:Player):Control {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ class Spawner {
|
||||
this.config = config;
|
||||
this.points = points;
|
||||
this.runner = null;
|
||||
this.index = 0;
|
||||
queue = [];
|
||||
indexedPoints = new Map();
|
||||
anyPoints = [];
|
||||
@@ -68,7 +69,7 @@ class Spawner {
|
||||
|
||||
private function run():Void {
|
||||
if (timer == null) {
|
||||
timer = new Timer(config.spawnInterval);
|
||||
timer = new Timer(config.spawnInterval == null ? 1 : config.spawnInterval);
|
||||
timer.run = spawn;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user