added Storage and ControlsSettings
Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
+12
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
|
||||
* Copyright (c) 2020. Antonio Martinez Casadesus and Pascal Syma.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -7,6 +7,8 @@ import Phaser from "phaser";
|
||||
import Menu from "./scenes/Menu";
|
||||
import Preload from "./scenes/Preload";
|
||||
import Game from "./scenes/Game";
|
||||
import ControlsSettings from "./scenes/ControlsSettings";
|
||||
import RexUIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin.js';
|
||||
|
||||
const ratio = 16 / 9; // any ratio you want, 16/9 landscape or 9/16 portrait
|
||||
const DEFAULT_HEIGHT = 1080 / 4; // any height you want
|
||||
@@ -21,11 +23,18 @@ const config = {
|
||||
height: DEFAULT_HEIGHT
|
||||
},
|
||||
parent: "phaser-example",
|
||||
scene: [Preload, Menu, Game],
|
||||
scene: [Preload, Menu, ControlsSettings, Game],
|
||||
pixelArt: true,
|
||||
antialias: false,
|
||||
// pixelArt: true,
|
||||
// roundPixels: true
|
||||
// roundPixels: true,
|
||||
plugins: {
|
||||
scene: [{
|
||||
key: 'rexUI',
|
||||
plugin: RexUIPlugin,
|
||||
mapping: 'rexUI'
|
||||
}]
|
||||
}
|
||||
};
|
||||
|
||||
const game = new Phaser.Game(config);
|
||||
|
||||
Reference in New Issue
Block a user