Intelligent graphic sets implemented

This commit is contained in:
Mal
2023-09-24 01:48:01 +02:00
parent 6f548a1b47
commit e6c247c655
12 changed files with 319 additions and 38 deletions

View File

@@ -6,7 +6,8 @@ let GraphicSet = [
scale: 3,
backgroundColor: '#6096ff',
backgroundImage: null,
tilePreview: 5
tilePreview: 5,
primaryTiles: 8,
},
{
name: 'Moon',
@@ -15,7 +16,8 @@ let GraphicSet = [
scale: 3,
backgroundColor: 'black',
backgroundImage: 'background_earth.jpg',
tilePreview: 1
tilePreview: 1,
primaryTiles: 2,
},
{
name: 'Death Star',
@@ -24,7 +26,8 @@ let GraphicSet = [
scale: 1,
backgroundColor: '#171721',
backgroundImage: null,
tilePreview: 1
tilePreview: 1,
primaryTiles: 6,
}
];

View File

@@ -79,7 +79,7 @@ export default class Level
let loader = new FileLoader(filename);
loader.onLoad = (data) => {
const json = JSON.parse(data);
const level = new Level(Terrain.createFromJson(json));
const level = new Level(Terrain.createFromJson(json));
level.setGravity(json.gravity);
callback(level);