[server] update

This commit is contained in:
2018-03-19 17:39:34 +03:00
parent f7bf5e2b0e
commit e657fb16bd
15 changed files with 133 additions and 36 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}
}