Skip to content

Commit

Permalink
Rename Second to SecondLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
pierpo committed Oct 17, 2018
1 parent bb694aa commit 87a5eca
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion assets/map.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -5610,7 +5610,7 @@
<object id="11" x="355.775" y="408.424" width="13.5609" height="44.6713">
<properties>
<property name="comesBackFrom" value="right"/>
<property name="scene" value="Second"/>
<property name="scene" value="SecondLevel"/>
<property name="type" value="CHANGE_SCENE"/>
</properties>
</object>
Expand Down
4 changes: 2 additions & 2 deletions assets/tilemap.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"properties":
{
"comesBackFrom":"right",
"scene":"Second",
"scene":"SecondLevel",
"type":"CHANGE_SCENE"
},
"propertytypes":
Expand Down Expand Up @@ -9644,4 +9644,4 @@
"type":"map",
"version":1,
"width":40
}
}
4 changes: 2 additions & 2 deletions src/constants/maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export const MAPS = {
file: 'tilemap.json',
key: 'first-level',
},
second: {
secondLevel: {
file: 'second-map.json',
key: 'second',
key: 'second-level',
},
};
2 changes: 1 addition & 1 deletion src/constants/scenes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const SCENES = {
UI: 'UIScene',
FIRST_LEVEL: 'FirstLevel',
SECOND: 'Second',
SECOND_LEVEL: 'SecondLevel',
};
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -19,7 +19,7 @@ class PhaserGame extends Phaser.Game {
// debug: true,
// },
},
scene: [Preloader, FirstLevel, Second, UIScene],
scene: [Preloader, FirstLevel, SecondLevel, UIScene],
};
super(config);
}
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/Preloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions src/scenes/Second.ts → src/scenes/SecondLevel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 87a5eca

Please sign in to comment.