[common] added GameSave
This commit is contained in:
15
src/client/haxe/ru/m/tankz/bundle/LevelBundle.hx
Normal file
15
src/client/haxe/ru/m/tankz/bundle/LevelBundle.hx
Normal file
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user