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
User prompt
Please fix the bug: 'Uncaught ReferenceError: sprite is not defined' in or related to this line: 'this.sprite = sprite;' Line Number: 335
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -331,25 +331,23 @@
anchorY: 0.5
}));
if (this.camp == humanCamp) {
this.sprite = buldorock_sprite;
+ this.dxAvHotSpot = buldoRockHotSpotX; //Hotspot avant du sprite (point de contact avec un rocher) décalage par rapport au point d'ancrage
+ this.dyAvHotSpot = buldoRockHotSpotY;
+ this.dxBkHotSpot = buldoRockBkHotSpotX; //Offset du point chaud arriere du sprite (point de contact avec un autre Buldo) décalage par rapport au point d'ancrage
+ this.dyBkHotSpot = buldoRockBkHotSpotY;
} else if (this.camp == ordiCamp) {
this.sprite = buldozer_sprite;
+ this.dxAvHotSpot = buldoZerHotSpotX; //Hotspot avant du sprite (point de contact avec un rocher) décalage par rapport au point d'ancrage
+ this.dyAvHotSpot = buldoZerHotSpotY;
+ this.dxBkHotSpot = buldoZerBkHotSpotX; //Offset du point chaud arriere du sprite (point de contact avec un autre Buldo) décalage par rapport au point d'ancrage
+ this.dyBkHotSpot = buldoZerBkHotSpotY;
}
this.sprite.x = x;
this.sprite.y = y;
this.sprite.anchor.set(0.5);
this.sprite.scale.set(1.0);
- // Since dxHotSpot and dyHotSpot are not defined globally, we need to use the specific hotspots based on the buldo's camp
- if (this.camp == humanCamp) {
- this.dxAvHotSpot = buldoRockHotSpotX; // Use buldoRockHotSpotX for humanCamp
- this.dyAvHotSpot = buldoRockHotSpotY; // Use buldoRockHotSpotY for humanCamp
- } else if (this.camp == ordiCamp) {
- this.dxAvHotSpot = buldoZerHotSpotX; // Use buldoZerHotSpotX for ordiCamp
- this.dyAvHotSpot = buldoZerHotSpotY; // Use buldoZerHotSpotY for ordiCamp
- }
- this.dxBkHotSpot = dxBkHotSpot; //Offset du point chaud arriere du sprite (point de contact avec un autre Buldo) décalage par rapport au point d'ancrage
- this.dyBkHotSpot = dyBkHotSpot;
this.xBase = x; //Position de base du sprite
this.yBase = y;
this.stack = []; //Pile des points x,y destination cliqués par la souris
this.movesStack = []; //Pile des mouvements a effectuer (types de mouvements : 1 : rotation, 2 : horizontal, 3 : vertical, 4 : xy)
@@ -374,29 +372,8 @@
this.angleDegresTotal = 0.0; //Angle total a tourner en degres
this.angleRadiansLeft = 0.0; //Angle restant a tourner en radians
this.vitesseAngulaireDS = 2.0; //vitesse de rotation du sprite en degres par secondes
this.vitesseAngulaireRms = 0.0; //vitesse angulaire en radians par millisecondes
- var buldorock_sprite = game.addChild(LK.getAsset('bulldorock', {
- anchorX: 0.5,
- anchorY: 0.5
- }));
- var buldozer_sprite = game.addChild(LK.getAsset('bulldozer', {
- anchorX: 0.5,
- anchorY: 0.5
- }));
- if (this.camp == humanCamp) {
- this.sprite = buldorock_sprite;
- this.dxAvHotSpot = buldoRockHotSpotX; //Hotspot avant du sprite (point de contact avec un rocher) décalage par rapport au point d'ancrage
- this.dyAvHotSpot = buldoRockHotSpotY;
- this.dxBkHotSpot = buldoRockBkHotSpotX; //Offset du point chaud arriere du sprite (point de contact avec un autre Buldo) décalage par rapport au point d'ancrage
- this.dyBkHotSpot = buldoRockBkHotSpotY;
- } else if (this.camp == ordiCamp) {
- this.sprite = buldozer_sprite;
- this.dxAvHotSpot = buldoZerHotSpotX; //Hotspot avant du sprite (point de contact avec un rocher) décalage par rapport au point d'ancrage
- this.dyAvHotSpot = buldoZerHotSpotY;
- this.dxBkHotSpot = buldoZerBkHotSpotX; //Offset du point chaud arriere du sprite (point de contact avec un autre Buldo) décalage par rapport au point d'ancrage
- this.dyBkHotSpot = buldoZerBkHotSpotY;
- }
}); //fin constructor
function generateRandomRock(nombreRochers) {
//Calcul de positions aléatoire pour les rochers dans la zone de route
var zoneMiniy = RoadZone.y;
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.