[editor] custom map size fix
This commit is contained in:
@@ -89,15 +89,16 @@ import ru.m.tankz.util.LevelUtil;
|
||||
FileUtil.browse().then(function(content:FileContent) {
|
||||
fileNameLabel.text = content.name;
|
||||
var data = LevelUtil.loads(config, content.content);
|
||||
mapView.gridSize = data.size;
|
||||
mapView.data = data;
|
||||
levelName.text = data.name;
|
||||
/*if (data.size != null) {
|
||||
if (data.size != null) {
|
||||
widthInput.text = Std.string(data.size.width);
|
||||
heightInput.text = Std.string(data.size.height);
|
||||
} else {
|
||||
widthInput.text = "";
|
||||
heightInput.text = "";
|
||||
}*/
|
||||
}
|
||||
});
|
||||
case 'saveButton':
|
||||
L.d(TAG, 'SAVE');
|
||||
|
||||
@@ -113,9 +113,8 @@ enum Brush {
|
||||
private function set_data(value:LevelConfig):LevelConfig {
|
||||
reset();
|
||||
pointEntities = new Map();
|
||||
map = new LevelMap(config.map);
|
||||
map = new LevelMap(config.map, gridSize);
|
||||
map.setData(value.data);
|
||||
gridSize = value.size;
|
||||
gameEventSignal.emit(EventUtil.buildBricksSpawn(map));
|
||||
for (point in config.points) {
|
||||
switch point.type {
|
||||
|
||||
Reference in New Issue
Block a user