You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
987 B
28 lines
987 B
"use strict";
|
|
class Jeu extends Scene {
|
|
constructor(element) {
|
|
super(element, false);
|
|
this.zoneDeJeu_ = new Sprite(document.getElementById("jeu"));
|
|
this.zoneDeJeu_.setWidth(this.getWidth());
|
|
this.zoneDeJeu_.setHeight(this.getHeight());
|
|
}
|
|
start() {
|
|
this.joueur_ = new Joueur(document.createElement("img"), this);
|
|
this.joueur_.setImage("img/joe.png", 50, 60);
|
|
this.joueur_.setX(this.zoneDeJeu_.getWidth() / 2 - this.joueur_.getWidth() / 2);
|
|
this.joueur_.setY(this.zoneDeJeu_.getHeight() / 2 - this.joueur_.getHeight() / 2);
|
|
this.appendChild(this.joueur_);
|
|
this.joueur_.animer();
|
|
this.regles_ = new Regles(document.getElementById("regles"), this);
|
|
this.objet_ = new Objet(document.createElement("img"), this);
|
|
this.objet_.positionnement();
|
|
setInterval(() => { this.objet_.apparition(); }, 1000);
|
|
}
|
|
pause() {
|
|
}
|
|
unpause() {
|
|
}
|
|
clean() {
|
|
}
|
|
}
|