Code edit (8 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: 'scoreOrdiText.x = OrdiZone.x + HumanZone.width / 2;' Line Number: 933
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: LK.Text2 is not a constructor' in or related to this line: 'var scoreHumainText = new LK.Text2('Score Humain: 0', {' Line Number: 912
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: updateScoreHumainText is not defined' in or related to this line: 'updateScoreHumainText.text = mettreAJourScore(scoreHumain);' Line Number: 960
User prompt
Please fix the bug: 'Uncaught TypeError: LK.Text2 is not a constructor' in or related to this line: 'var scoreOrdiText = new LK.Text2('Score Ordi: 0', {' Line Number: 919
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: LK.Text2 is not a constructor' in or related to this line: 'var scoreHumainText = new LK.Text2('Score Humain: 0', {' Line Number: 911
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'pushedByOrdi')' in or related to this line: 'if (this.camp == humanCamp && this.rocherDestination.pushedByHuman != this) {' Line Number: 655
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'pushedByOrdi')' in or related to this line: 'if (this.camp == humanCamp && this.rocherDestination.pushedByHuman != this) {' Line Number: 655
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'pushedByHuman')' in or related to this line: 'if (this.rocherPushed.pushedByHuman == null && this.rocherPushed.pushedByOrdi == null) {' Line Number: 641
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'pushedByOrdi')' in or related to this line: 'if (this.camp == humanCamp && this.rocherDestination.pushedByHuman != this) {' Line Number: 649
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'pushedByOrdi')' in or related to this line: 'if (this.camp == humanCamp && this.rocherDestination.pushedByHuman != this) {' Line Number: 649
Code edit (8 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: 'targetX = this.rocherDestination.pushedByOrdi.sprite.x; //La cible principale est le Buldo ordi poussant' Line Number: 664
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'sprite')' in or related to this line: 'targetX = this.rocherDestination.pushedByOrdi.sprite.x; //La cible principale est le Buldo ordi poussant' Line Number: 664
Code edit (1 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: 'targetX = this.rocherDestination.pushedByHuman.sprite.x; //La cible principale est le buldo allie poussant' Line Number: 685
Code edit (23 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: 'targetX = this.rocherDestination.pushedByHuman.sprite.x; //La cible principale est le buldo allie poussant' Line Number: 685
===================================================================
--- original.js
+++ change.js
@@ -345,11 +345,11 @@
buldo.addMoveToStack(typeRotation, sens * 90, 0); //Test rotation Buldo
buldo.addMoveToStack(typeLigneVtoY, 0, y); //Test mouvement Buldo
buldo.addMoveToStack(typeRotation, -sens * 90, 0); //Test rotation Buldo
buldo.addMoveToStack(typeLigneHtoR, this, 0); //Test mouvement Buldo vers le rocher
- //buldo.addMoveToStack(typeRotation, 180, 0); //Test rotation Buldo
- //buldo.addMoveToStack(typeLigneHtoX, buldo.xBase + buldo.camp * buldo.dxAvHotSpot, 0); //Test mouvement Buldo vers la position de base
- //buldo.addMoveToStack(typeRotation, -180, 0); //Test rotation Buldo
+ buldo.addMoveToStack(typeRotation, 180, 0); //Test rotation Buldo
+ buldo.addMoveToStack(typeLigneHtoX, buldo.xBase + buldo.camp * buldo.dxAvHotSpot, 0); //Test mouvement Buldo vers la position de base
+ buldo.addMoveToStack(typeRotation, -180, 0); //Test rotation Buldo
}
}
}; //fin onClickRocherBuldo
this.destroy = function () {
@@ -383,9 +383,9 @@
scoreOrdi = Number(scoreOrdi) + Math.log2(this.tailleRocher);
}
this.vitesse = 0.0; //Arret du rocher (et donc des buldos qui le poussent)
this.isBeingPushed = false; //Le rocher n'est plus pousse
- this.totalPushers = -1; //Plus aucun buldo ne pousse le rocher
+ this.totalPushers = 999; //Plus aucun buldo ne pousse le rocher
//Destruction du sprite rocher
this.destroy();
}
}; //fin onOutRocher
@@ -614,8 +614,15 @@
//Choix de la cible : point chaud du rocher ou point chaud arriere du Buldo allie poussant
var targetX = this.rocherDestination.sprite.x; //Cible principale par defaut
var dxHotSpotR = this.camp == humanCamp ? this.rocherDestination.dxHotLeftSpot : this.rocherDestination.dxHotRightSpot; //Point chaud du rocher
switch (this.rocherDestination.totalPushers) {
+ case 999:
+ //Rocher detruit
+ targetX = this.sprite.x; //La cible principale est l'endroit ou se trouve le Buldo
+ dxHotSpotR = this.camp * this.dxAvHotSpot;
+ this.rocherDestination = null; //Plus de rocher a pousser
+ this.isMovingR = null; //Fin du mouvement
+ break;
case 0:
//Deux cas possibles : zero pousseur ou un pousseur de chaque cote
if (this.rocherDestination.pushedByHuman != null && this.rocherDestination.pushedByOrdi != null) {
//Si un Buldo de chaque cote
@@ -624,9 +631,9 @@
}
break;
case 1:
//Un pousseur cote humain ou bien deux pousseurs humains et un seul pousseur ordi
- if (this.camp == humanCamp && this.rocherDestination.pushedByHuman != this) {
+ if (this.camp == humanCamp && this.rocherDestination && this.rocherDestination.pushedByHuman != this) {
//Si le Buldo poussant le rocher est un Buldo humain mais pas this
targetX = this.rocherDestination.pushedByHuman.sprite.x; //La cible principale est le Buldo humain poussant
dxHotSpotR = this.rocherDestination.pushedByHuman.dxBkHotSpot; //Le point chaud est l'arriere du Buldo humain poussant
} else if (this.camp == humanCamp && this.rocherDestination.pushedByHuman == this) {
@@ -795,8 +802,10 @@
rock.dyHotLeftSpot = grosRocherDyHotLeft;
rock.dxHotRightSpot = grosRocherDxHotRight;
rock.dyHotRightSpot = grosRocherDyHotRight;
}
+ //Initialisation de parametres
+ rock.totalPushers = 0;
rochers.push(rock);
}
//On ajoute les evenements de clic sur les sprites rocher
for (var i = 0; i < rochers.length; i++) {
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.