Wenn ich das Debug überprüfe, erhalte ich Folgendes:
Uncaught TypeError: Class erweitert Wert undefiniert ist kein Konstruktor oder null
Hier ist meine Indexdatei
Code: Select all
save the mahanadi river, an energy project
hello for now
Code: Select all
class Boot extends Phaser.scene {
constructor() {
super("Boot")
};
preload (){
};
create (){
this.add.text(20, 20, "welcome!")
};
update (){
};
};
Code: Select all
window.onload = function(){
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
physics: {
default: 'arcade',
arcade: {
gravity: { y: 300 },
debug: false
}
},
scene: {
preload: preload,
create: create,
update: update
}
};
var game = new Phaser.Game(config);
}
ok thanks photon storm but i still have bugs
my game.js
window.onload = function(){
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
Scenes: [Boot,Menu],
Scenes.push(Boot),
Scenes.push(Menu),
physics: {
default: 'arcade',
arcade: {
gravity: { y: 300 },
debug: false
}
},
};
var game = new Phaser.Game(config);
}
Mobile version