Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: rocher_pouf_sprite is not defined' in or related to this line: 'rocher.sprite = rocher_pouf_sprite;' Line Number: 1010
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: LK.wait is not a function' in or related to this line: 'LK.wait(4000, function () {' Line Number: 1009
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'rocher_pouf_sprite')' in or related to this line: 'rocher.sprite = self.rocher_pouf_sprite;' Line Number: 1003
Code edit (1 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: LK.getTick is not a function' in or related to this line: 'rocher.sprite.alpha = Math.abs(Math.sin(LK.getTick() / 100)); //Clignotement du rocher' Line Number: 991
Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: rocher is undefined' in or related to this line: 'var sens = this.yBase < rocher.sprite.y ? 1 : -1; //Calcul du sens de deplacement verticale : 1=bas, -1=haut' Line Number: 735
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: 'ReferenceError: rochersCibles is not defined' in or related to this line: 'scoreTest = rochersCibles.length;' Line Number: 750
Code edit (6 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: this.srite is undefined' in or related to this line: 'if (this.rochersCibles.length == 0 && this.srite.y != this.yBase) {' Line Number: 745
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: yBase is not defined' in or related to this line: 'sens = this.sprite.y == yBase ? -sens : sens; //Si le Buldo par face a la route, il doit se tourner vers le rocher' Line Number: 737
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'scoreTest = this.pushers.length;' Line Number: 816
===================================================================
--- original.js
+++ change.js
@@ -80,8 +80,9 @@
- The goal for the human player is to move all the rocks to the ComputerZone while preventing the computer from doing the same. Effective strategy and skillful bulldozer management are necessary to maximize the score.
There is no time limit in this game, and players must use their judgment to determine the best way to move rocks and use their bulldozers to win the game.
*/
//PARAMETRES DIVERS DU JEU
+//LK.init.image('pouf', {width:100, height:100, id:'662e608a2a374391362a0467'})
function _typeof2(o) {
"@babel/helpers - typeof";
return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
@@ -377,8 +378,13 @@
//On vide la liste des buldos qui poussent le rocher
this.pushers = [];
//On recupere l'ordonnee du rocher pour une potentielle reutilisation
ordonneesRestantes.push(this.sprite.y);
+ //On supprime le rocher de la liste des rochers
+ var index = rochers.indexOf(this);
+ if (index > -1) {
+ rochers.splice(index, 1);
+ }
nbRochers = nbRochers - 1; //Decrement du nombre de rochers
//Invisibilite du sprite rocher
this.sprite.visible = false;
}; //fin destroy
@@ -984,20 +990,30 @@
if (rocher.tempoBlocked > timeBeforeSplit) {
//Si le rocher est bloque depuis plus de n ticks on arrete de le faire clignoter
rocher.sprite.alpha = 1;
rocher.tempoBlocked = 0;
- scoreTest += 10;
+ var rocher_pouf_sprite = game.addChild(LK.getAsset('pouf', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ }));
+ rocher.sprite = rocher_pouf_sprite;
+ rocher.sprite.x = rocher.sprite.x;
+ rocher.sprite.y = rocher.sprite.y;
+ rocher.sprite.visible = true;
rochersToDestroy.push(rocher);
}
}
});
//On detruit les rochers bloques apres quelques secondes
- LK.setTimeout(function () {
+ //LK.setTimeout(function () { //A garder pour memoire
+ if (rochersToDestroy.length > 0) {
rochersToDestroy.forEach(function (rocher) {
- rocher.sprite = rocher.rocher_pouf_sprite;
+ scoreTest += 10;
rocher.destroy();
});
- }, 4000);
+ }
+ rochersToDestroy = []; //On vide le tableau des rochers a detruire
+ //}, 4000);
}
//Mise à jour des scores
updateScoreHumain(scoreHumain);
updateScoreOrdi(scoreOrdi);
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.