Ajout de la possibilité de changer de langue sur la page de démarrage du jeux - Ajout de la flèche de retour sur le jeu pour revenir aux choix des types de jeux - Création des catégories lors de la création d'une action dans le but de sélectionner les boutons : par exemple, on peut sélectionner les boutons avancer et ennemi. Alors que si le bouton avancer est sélectionné et qu'on clique sur reculer, le bouton avancer va se déselectionner car ils appartiennt à la meme categorie - Les boutons sélectionnés apparaissent avec une teinte jaune.
parent
cc63903380
commit
d451659c97
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1017 B |
After Width: | Height: | Size: 7.4 KiB |
@ -1 +1 @@
|
||||
function selectWord(e,a){switch(LANG){case"fr":return a;default:return e}}const LANG=navigator.language.substr(0,2).toLowerCase(),SHIELD_PER_SECOND=5,COLOR_ATTACK=16711680,COLOR_MOVE=255,COLOR_CONDITION=921102,WIDTH_WINDOW=$(document).width()-20,HEIGHT_WINDOW=$(document).height()-20,WIDTH_MAP=WIDTH_WINDOW<HEIGHT_WINDOW?.8*WIDTH_WINDOW:.8*HEIGHT_WINDOW,SPEED=2,LIFE=100,DAMAGE=40,SHIELD=100,RANGE=WIDTH_MAP/2;var config={type:Phaser.AUTO,width:WIDTH_WINDOW,height:HEIGHT_WINDOW,parent:"all",backgroundColor:"#35363A"},game=new Phaser.Game(config);game.scene.add("Boot",Boot),game.scene.add("Type",Type),game.scene.add("Game",new Game(game)),game.scene.start("Boot");
|
||||
function selectWord(e,t){switch(LANG){case"fr":return t;default:return e}}var LANG=navigator.language.substr(0,2).toLowerCase();const SHIELD_PER_SECOND=5,COLOR_ATTACK=16711680,COLOR_MOVE=255,COLOR_CONDITION=921102,WIDTH_WINDOW=$(document).width()-20,HEIGHT_WINDOW=$(document).height()-20,WIDTH_MAP=WIDTH_WINDOW<HEIGHT_WINDOW?.8*WIDTH_WINDOW:.8*HEIGHT_WINDOW,SPEED=2,LIFE=100,DAMAGE=40,SHIELD=100,RANGE=WIDTH_MAP/2;var config={type:Phaser.AUTO,width:WIDTH_WINDOW,height:HEIGHT_WINDOW,parent:"all",backgroundColor:"#35363A"};let father=new Phaser.Game(config);father.scene.add("Boot",new Boot(father)),father.scene.add("Type",Type),father.scene.add("Game",new Game(father)),father.scene.start("Boot");
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,23 @@
|
||||
class Category {
|
||||
constructor(name = 'undefined', single = true) {
|
||||
this.name = name;
|
||||
this.single = single;
|
||||
this.lBtn = [];
|
||||
}
|
||||
|
||||
add(btn) {
|
||||
if (this.lBtn.length !== 0 && this.single) {
|
||||
this.lBtn[0].clearTint();
|
||||
this.lBtn = [];
|
||||
}
|
||||
this.lBtn.push(btn);
|
||||
btn.tint = 0xEFD807;
|
||||
}
|
||||
|
||||
remove(btn) {
|
||||
if (this.lBtn.indexOf(btn) !== -1) {
|
||||
this.lBtn.splice(this.lBtn.indexOf(btn), 1);
|
||||
}
|
||||
btn.clearTint();
|
||||
}
|
||||
}
|
Loading…
Reference in new issue