feat: make RMG random
This commit is contained in:
parent
63bb9c3d79
commit
db0cfd0bd2
|
@ -14,7 +14,8 @@ export default class Tutorial extends GameLevel{
|
||||||
// Load resources
|
// Load resources
|
||||||
// this.load.tilemap("forest1", "shattered_sword_assets/tilemaps/Tutorial.json");
|
// this.load.tilemap("forest1", "shattered_sword_assets/tilemaps/Tutorial.json");
|
||||||
// let map = localStorage.getItem("map");
|
// let map = localStorage.getItem("map");
|
||||||
let rmg = new RandomMapGenerator("shattered_sword_assets/jsons/forest_template.json", 114514);
|
let randomSeed = Math.floor(Math.random()*10000000000);
|
||||||
|
let rmg = new RandomMapGenerator("shattered_sword_assets/jsons/forest_template.json", randomSeed);
|
||||||
this.map = rmg.getMap();
|
this.map = rmg.getMap();
|
||||||
this.load.tilemapFromObject("forest1", this.map);
|
this.load.tilemapFromObject("forest1", this.map);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user