Code edit (22 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: victoireX is not defined' in or related to this line: 'var coupeVictoire = LK.getAsset('coupeVictoire', {' Line Number: 842
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: rocher_petit_sprite is not defined' in or related to this line: 'self.sprite = rocher_petit_sprite;' Line Number: 327
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: rocher_moyen_sprite is not defined' in or related to this line: 'self.sprite = rocher_moyen_sprite;' Line Number: 330
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: buldorock_sprite is not defined' in or related to this line: 'this.sprite = buldorock_sprite;' Line Number: 505
User prompt
Please fix the bug: 'Uncaught ReferenceError: buldorock_sprite is not defined' in or related to this line: 'this.sprite = buldorock_sprite;' Line Number: 505
Code edit (1 edits merged)
Please save this source code
Code edit (22 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: coupeVictoire is not defined' in or related to this line: 'LK.gui.top.addChild(coupeVictoire);' Line Number: 1001
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Graphics is not a constructor' in or related to this line: 'var routeZone = new Graphics();' Line Number: 292
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Manque t'il route_sprite.x *= -1;
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: rochers[i] is undefined' in or related to this line: 'if (rochers[i].isClicked) {' Line Number: 1029
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -475,18 +475,22 @@
var self = this; // Ensure 'self' is defined to refer to the Buldo instance
this.name = "buldo";
this.camp = camp; //Camp du buldo (1=Human buldoRock ou -1=Ordi buldoZer)
this.isSelected = false; //Flag qui indique si le Buldo est selectionne
- var buldorock_sprite = game.addChild(LK.getAsset('bulldorock', {
+ this.buldorock_sprite = LK.getAsset('bulldorock', {
anchorX: 0.5,
anchorY: 0.5
- }));
- var buldozer_sprite = game.addChild(LK.getAsset('bulldozer', {
+ });
+ this.buldozer_sprite = LK.getAsset('bulldozer', {
anchorX: 0.5,
anchorY: 0.5
- }));
+ });
if (this.camp == humanCamp) {
- this.sprite = buldorock_sprite;
+ if (this.camp == humanCamp) {
+ this.sprite = this.buldorock_sprite;
+ } else if (this.camp == ordiCamp) {
+ this.sprite = this.buldozer_sprite;
+ }
} else if (this.camp == ordiCamp) {
this.sprite = buldozer_sprite;
}
this.sprite.x = x;
@@ -924,8 +928,10 @@
}
//On initialise la position de base
buldo.sprite.x = buldo.xBase;
buldo.sprite.y = buldo.yBase;
+ var buldo_sprite = buldo.camp == humanCamp ? buldo.buldorock_sprite : buldo.buldozer_sprite;
+ game.addChild(buldo_sprite);
return buldo;
} //fin createSingleBuldo
function createBuldos() {
//CREATION D'OBJETS A PARTIR DES SPRITES //constructor(x, y, camp)
@@ -980,15 +986,17 @@
anchorY: 0
});
//LK.gui.top.addChild(scoreFictifText);
//Creation de l'objet coupe de la victoire a partir de l'image coupeVictoire entre les deux scores
-var coupeVictoire = game.addChild(LK.getAsset('coupeVictoire', {
- anchorX: 0.5,
- anchorY: 0
-}));
-LK.gui.top.addChild(coupeVictoire);
-coupeVictoire.x = 1000;
-coupeVictoire.y = 1000;
+var coupeVictoire = LK.getAsset('coupeVictoire', {
+ anchorX: 0,
+ anchorY: 0,
+ scaleX: 2,
+ scaleY: 2,
+ x: game.width / 2,
+ y: ScoreZone.height / 2
+});
+game.addChild(coupeVictoire);
// Fonction de rappel pour le tick
function onGameTick() {
// Autres mises à jour du jeu ici en cours de test..
}
A small rock
a rock without any shadow and four time smaller than the original.
Blue color
a rock is being crunched so there is smoke and peaces of rocks viewed from top.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Un trophée de victoire sous forme d'une coupe d'où s'échappe un feu d'artifice.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Red bulldozer viewed strictly from top. Top view as if we are a drone.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Remove yellow lines.