Files
tankz/src/client/haxe/ru/m/tankz/bundle/LevelBundle.hx
2018-02-20 00:01:35 +03:00

16 lines
432 B
Haxe

package ru.m.tankz.bundle;
import openfl.Assets;
import ru.m.tankz.config.Config;
import ru.m.tankz.Type;
import ru.m.tankz.util.LevelUtil;
class LevelBundle implements ILevelBundle {
public function get(type:GameType, config:Config, level:Int):LevelConfig {
var data:String = Assets.getText('resources/${type}/levels/level${LevelUtil.formatLevel(level)}.txt');
return LevelUtil.loads(config, data);
}
}