generated from UNRaf-PROGRAMACION/Phaser3-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
50 lines (48 loc) · 1.64 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import Creditos from "./src/scenes/Creditos.js";
import Precargas from "./src/scenes/Precargas.js";
import Derrota from "./src/scenes/Derrota.js";
import Ayuda from "./src/scenes/Ayuda.js";
import Menu from "./src/scenes/Menu.js";
import Parte1 from "./src/scenes/Parte1.js";
import VictoriaJuego from "./src/scenes/VictoriaJuego.js";
import Parte2 from "./src/scenes/Parte2.js";
import Parte3 from "./src/scenes/Parte3.js";
import Transicion1 from "./src/scenes/Transicion1.js";
import Transicion2 from "./src/scenes/Transicion2.js";
import Transicion3 from "./src/scenes/Transicion3.js";
import Transicion4 from "./src/scenes/Transicion4.js";
import Transicion5 from "./src/scenes/Transicion5.js";
import Obstaculo1 from "./src/scenes/Obstaculo1.js";
import Obstaculo2 from "./src/scenes/Obstaculo2.js";
import Obstaculo3 from "./src/scenes/Obstaculo3.js";
// Create a new Phaser config object
const config = {
type: Phaser.AUTO,
width: 800,
height: 600,
scale: {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH,
min: {
width: 800,
height: 600,
},
max: {
width: 1600,
height: 1200,
},
},
physics: {
default: "arcade",
arcade: {
gravity: { y: 300 },
debug: false,
},
},
// List of scenes to load
// Only the first scene will be shown
// Remember to import the scene before adding it to the list
scene: [Precargas, Creditos, Derrota, Ayuda, Menu, Parte1, Transicion1, Transicion2, Transicion3, Transicion4, Transicion5, Obstaculo1, Obstaculo2, Obstaculo3, VictoriaJuego, Parte2, Parte3],
};
// Create a new Phaser game instance
window.game = new Phaser.Game(config);