diff --git a/assets/map.tmx b/assets/map.tmx index 584b42f..239883f 100644 --- a/assets/map.tmx +++ b/assets/map.tmx @@ -5610,7 +5610,7 @@ - + diff --git a/assets/tilemap.json b/assets/tilemap.json index f554b52..42d6de9 100644 --- a/assets/tilemap.json +++ b/assets/tilemap.json @@ -141,7 +141,7 @@ "properties": { "comesBackFrom":"right", - "scene":"Second", + "scene":"SecondLevel", "type":"CHANGE_SCENE" }, "propertytypes": @@ -9644,4 +9644,4 @@ "type":"map", "version":1, "width":40 -} \ No newline at end of file +} diff --git a/src/constants/maps.ts b/src/constants/maps.ts index c63db11..23f84d7 100644 --- a/src/constants/maps.ts +++ b/src/constants/maps.ts @@ -3,8 +3,8 @@ export const MAPS = { file: 'tilemap.json', key: 'first-level', }, - second: { + secondLevel: { file: 'second-map.json', - key: 'second', + key: 'second-level', }, }; diff --git a/src/constants/scenes.ts b/src/constants/scenes.ts index 81d4314..8938c53 100644 --- a/src/constants/scenes.ts +++ b/src/constants/scenes.ts @@ -1,5 +1,5 @@ export const SCENES = { UI: 'UIScene', FIRST_LEVEL: 'FirstLevel', - SECOND: 'Second', + SECOND_LEVEL: 'SecondLevel', }; diff --git a/src/index.ts b/src/index.ts index bbfdece..bd98e5b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import 'phaser'; import { FirstLevel } from './scenes/FirstLevel'; -import { Second } from './scenes/Second'; +import { SecondLevel } from './scenes/SecondLevel'; import { Preloader } from './scenes/Preloader'; import { UIScene } from './scenes/UIScene'; @@ -19,7 +19,7 @@ class PhaserGame extends Phaser.Game { // debug: true, // }, }, - scene: [Preloader, FirstLevel, Second, UIScene], + scene: [Preloader, FirstLevel, SecondLevel, UIScene], }; super(config); } diff --git a/src/scenes/Preloader.ts b/src/scenes/Preloader.ts index b9b37ab..96e5935 100644 --- a/src/scenes/Preloader.ts +++ b/src/scenes/Preloader.ts @@ -15,7 +15,7 @@ export class Preloader extends Phaser.Scene { private loadAssets() { this.load.tilemapTiledJSON(MAPS.firstLevel.key, `assets/${MAPS.firstLevel.file}`); - this.load.tilemapTiledJSON(MAPS.second.key, `assets/${MAPS.second.file}`); + this.load.tilemapTiledJSON(MAPS.secondLevel.key, `assets/${MAPS.secondLevel.file}`); // Images this.load.image(ASSETS.IMAGES.LOGO, 'assets/logo.png'); diff --git a/src/scenes/Second.ts b/src/scenes/SecondLevel.ts similarity index 61% rename from src/scenes/Second.ts rename to src/scenes/SecondLevel.ts index 5bdd256..06e620d 100644 --- a/src/scenes/Second.ts +++ b/src/scenes/SecondLevel.ts @@ -2,8 +2,8 @@ import { AbstractScene } from './AbstractScene'; import { SCENES } from '../constants/scenes'; import { MAPS } from '../constants/maps'; -export class Second extends AbstractScene { +export class SecondLevel extends AbstractScene { constructor() { - super(SCENES.SECOND, MAPS.second.key); + super(SCENES.SECOND_LEVEL, MAPS.secondLevel.key); } }