Suppression des images en double dans assets - Modification de moveNode.png dans le but d'intégrer le visuel des différents bonus (attaque, bouclier, vitesse) - Modiciation du constructor des pages d'ajout et de modification d'une action pour une gestion plus simple - Lors d'une modification ou d'un ajout d'une action déplacement, il est dorénavant possible de sélectionner le type de bonus (attaque, bouclier, vitesse) - Création d'une claase Button dans le but de gérer plus simplement et raccourcir la création d'un bouton tel que play, pause, mute, vitesse du jeu ... - Ajout d'un bouton description bonus - Modification du chargement des images dans le but de ne pas recharger des images inutilement lors d'un chanegement de langue (les images qui n'ont pas d'écriture)
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 76 KiB |
@ -1 +1 @@
|
|||||||
{"enemyVisible":false,"bonusVisible":true,"robotRandomPosition":true,"tree":{"type":"waria","lRect":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lRect":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"move","option":[true,true]}]},"initStat":{"lBar":[{"value":0,"valueMax":5,"color":16711680,"colorMin":16711680},{"value":0,"valueMax":5,"color":8323327,"colorMin":8323327},{"value":5,"valueMax":5,"color":255,"colorMin":255},{"value":5,"valueMax":5,"color":32768,"colorMin":32768}],"lText":[["DAMAGE","DEGATS"],["R.S","RECHARGEMENT"],["SPEED","VITESSE"],["RANGE","PORTEE"]]},"robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[]},{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.3,"y":0.1,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.7,"y":0.1,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.5,"y":0.4,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.1,"y":0.9,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.3,"y":0.7,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.9,"y":0.2,"name":"enemy","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]}],"lBonus":[{"style":"speed","number":0,"x":0.5,"y":0.5},{"style":"attack","number":2,"x":0.7,"y":0.7},{"style":"shield","number":0,"x":0.2,"y":0.9},{"style":"shield","number":1,"x":0.8,"y":0.4},{"style":"shield","number":2,"x":0.2,"y":0.2}]}
|
{"enemyVisible":false,"bonusVisible":true,"robotRandomPosition":true,"tree":{"type":"waria","lRect":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lRect":[{"type":"move","option":[true,false,"speed"]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"move","option":[true,true]}]},"initStat":{"lBar":[{"value":0,"valueMax":5,"color":16711680,"colorMin":16711680},{"value":0,"valueMax":5,"color":8323327,"colorMin":8323327},{"value":5,"valueMax":5,"color":255,"colorMin":255},{"value":5,"valueMax":5,"color":32768,"colorMin":32768}],"lText":[["DAMAGE","DEGATS"],["R.S","RECHARGEMENT"],["SPEED","VITESSE"],["RANGE","PORTEE"]]},"robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[]},{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.3,"y":0.1,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.7,"y":0.1,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.5,"y":0.4,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.1,"y":0.9,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.3,"y":0.7,"name":"enemy","speed":1,"speedReload":1,"range":5,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]},{"height":0.1,"width":0.1,"x":0.9,"y":0.2,"name":"enemy","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"name":"condition","option":[true,true,false,0.5,0],"lNode":[{"name":"move","option":[false]}]},{"name":"attack","option":[]},{"name":"move","option":[true]}]}],"lBonus":[{"style":"speed","number":0,"x":0.5,"y":0.5},{"style":"attack","number":2,"x":0.7,"y":0.7},{"style":"shield","number":0,"x":0.2,"y":0.9},{"style":"shield","number":1,"x":0.8,"y":0.4},{"style":"shield","number":2,"x":0.2,"y":0.2}]}
|
@ -0,0 +1,20 @@
|
|||||||
|
class Button extends Phaser.GameObjects.Sprite {
|
||||||
|
constructor(scene, x, y, width, height, texture, fn, line = 0, visible = true) {
|
||||||
|
super(scene, x, y, texture);
|
||||||
|
this.name = texture;
|
||||||
|
this.setInteractive().setVisible(visible);
|
||||||
|
this.displayHeight = height;
|
||||||
|
this.displayWidth = width;
|
||||||
|
this.line = line;
|
||||||
|
this.on('pointerout', () => this.changeFrame(0));
|
||||||
|
this.on('pointerover', () => this.changeFrame(1));
|
||||||
|
this.on('pointerdown', fn);
|
||||||
|
this.changeFrame(0);
|
||||||
|
scene.add.existing(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
changeFrame(column = 0) {
|
||||||
|
this.setFrame(column + this.line * 2);
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,8 @@
|
|||||||
class Bonus {
|
class Bonus {
|
||||||
constructor(name, texture, value) {
|
constructor(name, texture, value, type) {
|
||||||
this.texture = texture;
|
this.texture = texture;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
this.type = type;
|
||||||
}
|
}
|
||||||
}
|
}
|