+6
-5
@@ -9,6 +9,7 @@ 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';
|
||||
import MainMenu from "./scenes/MainMenu";
|
||||
|
||||
const ratio = 16 / 9; // any ratio you want, 16/9 landscape or 9/16 portrait
|
||||
const DEFAULT_HEIGHT = 1080 / 4; // any height you want
|
||||
@@ -19,15 +20,15 @@ const config = {
|
||||
scale: {
|
||||
mode: Phaser.Scale.FIT,
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
width: DEFAULT_WIDTH,
|
||||
height: DEFAULT_HEIGHT
|
||||
},
|
||||
height: DEFAULT_HEIGHT,
|
||||
width: DEFAULT_WIDTH,
|
||||
parent: "phaser-example",
|
||||
scene: [Preload, Menu, ControlsSettings, Game],
|
||||
scene: [Preload, MainMenu, Menu, ControlsSettings, Game],
|
||||
pixelArt: true,
|
||||
antialias: false,
|
||||
// pixelArt: true,
|
||||
// roundPixels: true,
|
||||
autoFocus: true,
|
||||
roundPixels: true,
|
||||
plugins: {
|
||||
scene: [{
|
||||
key: 'rexUI',
|
||||
|
||||
Reference in New Issue
Block a user