mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Southpole level added
This commit is contained in:
11
js/Level.js
11
js/Level.js
@@ -85,6 +85,17 @@ export default class Level
|
||||
const json = JSON.parse(data);
|
||||
const level = new Level(Terrain.createFromJson(json));
|
||||
level.setGravity(json.gravity / Level.FACTOR_GRAVITY);
|
||||
|
||||
if (json.hasOwnProperty('effects')) {
|
||||
const effectFactory = new FullscreenEffectFactory();
|
||||
|
||||
for (const effect of json.effects) {
|
||||
level.fullscreenEffects.push(
|
||||
effectFactory.getEffect(effect)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
callback(level);
|
||||
}
|
||||
loader.loadContent();
|
||||
|
||||
@@ -87,6 +87,7 @@ const LEVEL = [
|
||||
'terrain8.json',
|
||||
'darius.json',
|
||||
'imperial-prison.json',
|
||||
'southpole.json',
|
||||
];
|
||||
|
||||
let game;
|
||||
|
||||
Reference in New Issue
Block a user