Phaser-Spiel erweitert das Problem nicht um die ArbeitsklasseHTML

HTML-Programmierer
Anonymous
 Phaser-Spiel erweitert das Problem nicht um die Arbeitsklasse

Post by Anonymous »

Ich entwerfe für ein Projekt und es sagt dies zu meinen Szenen und es ist nur ein leerer Bildschirm, der weiß ist
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


und mein Szenen-Problemcode

Code: Select all

class Boot extends Phaser.scene {
constructor() {
super("Boot")
};

preload (){

};

create (){
this.add.text(20, 20, "welcome!")
};

update (){

};
};
hier ist mein game.js

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);

}
Es gibt Probleme bei Phaser.push

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post