User prompt
Please fix the bug: 'Uncaught ReferenceError: buldorock_sprite is not defined' in or related to this line: 'buldos[i].sprite = buldorock_sprite;' Line Number: 681
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: this.setLigneVtoY is not a function' in or related to this line: 'this.setLigneVtoY(y); //On effectue le deplacement vertical' Line Number: 469
Code edit (10 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: buldoRock1.sprite.setAnchor is not a function' in or related to this line: 'buldoRock1.sprite.setAnchor(0.5, 0.5);' Line Number: 603
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'forEach')' in or related to this line: 'buldos.forEach(function (buldoCheck) {' Line Number: 341
Code edit (17 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'sprite')' in or related to this line: 'buldo.sprite.tint = 0xFFFFFF; //on enleve le filtre coloré' Line Number: 342
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: checkMovesStack is not defined' in or related to this line: 'LK.on('tick', checkMovesStack(delta)); //Verification des mouvements en cours' Line Number: 578
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'bind')' in or related to this line: 'buldos[i].sprite.on('down', this.onClickBuldo.bind(buldos[i], buldos));' Line Number: 474
User prompt
Please fix the bug: 'Uncaught ReferenceError: onClickBuldo is not defined' in or related to this line: 'buldos[i].sprite.on('down', onClickBuldo(buldos));' Line Number: 474
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 TypeError: Cannot set properties of undefined (setting 'onClickBuldo')' in or related to this line: 'self.onClickBuldo = function (buldos) {' Line Number: 388
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: OrdiZone is not defined' in or related to this line: 'var buldoZer1 = new Buldo(OrdiZone.x + OrdiZone.width / 2, OrdiZone.y + OrdiZone.height / 3, ordiCamp);' Line Number: 425
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: dxHotSpot is not defined' in or related to this line: 'this.dxAvHotSpot = dxHotSpot; //Offset du point chaud du sprite (point de contact avec le rocher) décalage par rapport au point d'ancrage' Line Number: 353
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'x')' in or related to this line: 'this.sprite.x = x;' Line Number: 336
===================================================================
--- original.js
+++ change.js
@@ -320,27 +320,29 @@
}
this.onClickRocherBuldo = function (buldos) {
//Action à effectuer lorsqu'on clique sur un rocher
//Récupération des coordonnées du sprite rocher cliqué
- var x = this.sprite.x;
- var y = this.sprite.y;
- this.sprite.tint = 0xF0D0E0; //on ajoute un filtre coloré
- //Parcours de la liste des buldos pour trouver le buldo selectionne
- var buldo = null;
- buldos.forEach(function (buldoCheck) {
- if (buldoCheck != null) {
- buldoCheck.sprite.tint = 0xFFFFFF; //on enleve le filtre coloré
- if (buldoCheck.isSelected) {
- buldo = buldoCheck;
+ if (buldos) {
+ var x = this.sprite.x;
+ var y = this.sprite.y;
+ this.sprite.tint = 0xF0D0E0; //on ajoute un filtre coloré
+ //Parcours de la liste des buldos pour trouver le buldo selectionne
+ var buldo = null;
+ buldos.forEach(function (buldoCheck) {
+ if (buldoCheck != null) {
+ buldoCheck.sprite.tint = 0xFFFFFF; //on enleve le filtre coloré
+ if (buldoCheck.isSelected) {
+ buldo = buldoCheck;
+ }
}
+ });
+ //Si le buldo selectionne est trouve, on le deplace vers le sprite rocher
+ if (buldo != null && !buldo.isMoving) {
+ x = buldo.camp == humanCamp ? x + this.dxHotLeftSpot : x + this.dxHotRightSpot;
+ y = buldo.camp == humanCamp ? y + this.dyHotLeftSpot : y + this.dyHotRightSpot;
+ buldo.rocherDestination = this; //Le buldo a pour destination le sprite rocher cliqué
+ buldo.addMoveToStack(typeLigneHtoX, x, y); //Test mouvement Buldo
}
- });
- //Si le buldo selectionne est trouve, on le deplace vers le sprite rocher
- if (buldo != null && !buldo.isMoving) {
- x = buldo.camp == humanCamp ? x + this.dxHotLeftSpot : x + this.dxHotRightSpot;
- y = buldo.camp == humanCamp ? y + this.dyHotLeftSpot : y + this.dyHotRightSpot;
- buldo.rocherDestination = this; //Le buldo a pour destination le sprite rocher cliqué
- buldo.addMoveToStack(typeLigneHtoX, x, y); //Test mouvement Buldo
}
}; //fin onClickRocherBuldo
}); //fin class Rocher
var Buldo = /*#__PURE__*/_createClass2(function Buldo(x, y, camp) {
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.