Code edit (1 edits merged)
Please save this source code
User prompt
haz que detecte como boca abierta cuando este este a la mitad
User prompt
Haz que al abrir la boca tamanΜo de player se reduzca un 50% y al cerrar se recupere βͺπ‘ Consider importing and using the following plugins: @upit/facekit.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'FaceFollower is not defined' in or related to this line: 'var faceFollower = game.addChild(new FaceFollower());' Line Number: 52
Code edit (4 edits merged)
Please save this source code
User prompt
ajusta el rango de movimiento para que sea un guadrado en medio de la pantalla
User prompt
repite lo mismo para el eje x
User prompt
haz que facefollower object no supere la top y 500 y bottom 2000
User prompt
y un maximo de 2000
User prompt
haz que facefollower object no supere y 500
User prompt
si la boca se abre que facefollower salte
User prompt
haz que el fondo sea negro
Code edit (1 edits merged)
Please save this source code
User prompt
Crea un objeto que siga el rostro βͺπ‘ Consider importing and using the following plugins: @upit/facekit.v1
User prompt
Crea un objetico que siga al rostro βͺπ‘ Consider importing and using the following plugins: @upit/facekit.v1
User prompt
implementa el plugin facekit.v1 βͺπ‘ Consider importing and using the following plugins: @upit/facekit.v1
User prompt
Sonic Jumper
Initial prompt
null
/**** * Plugins ****/ var facekit = LK.import("@upit/facekit.v1"); /**** * Classes ****/ var FaceFollower = Container.expand(function () { var self = Container.call(this); var faceGraphics = self.attachAsset('faceObject', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Update the position of the face follower to follow the nose tip self.x = facekit.noseTip.x; self.y = facekit.noseTip.y; // Adjust the range of movement for the faceFollower object to be within a square in the middle of the screen var leftBound = (2048 - 1000) / 2; var rightBound = leftBound + 1000; var topBound = (2732 - 1000) / 2; var bottomBound = topBound + 1000; if (self.y < topBound) { self.y = topBound; } else if (self.y > bottomBound) { self.y = bottomBound; } if (self.x < leftBound) { self.x = leftBound; } else if (self.x > rightBound) { self.x = rightBound; } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ var faceFollower = game.addChild(new FaceFollower());
===================================================================
--- original.js
+++ change.js
@@ -15,19 +15,22 @@
self.update = function () {
// Update the position of the face follower to follow the nose tip
self.x = facekit.noseTip.x;
self.y = facekit.noseTip.y;
- // Ensure the faceFollower object stays within the vertical bounds
- if (self.y < 500) {
- self.y = 500;
- } else if (self.y > 2000) {
- self.y = 2000;
+ // Adjust the range of movement for the faceFollower object to be within a square in the middle of the screen
+ var leftBound = (2048 - 1000) / 2;
+ var rightBound = leftBound + 1000;
+ var topBound = (2732 - 1000) / 2;
+ var bottomBound = topBound + 1000;
+ if (self.y < topBound) {
+ self.y = topBound;
+ } else if (self.y > bottomBound) {
+ self.y = bottomBound;
}
- // Ensure the faceFollower object stays within the horizontal bounds
- if (self.x < 500) {
- self.x = 500;
- } else if (self.x > 2000) {
- self.x = 2000;
+ if (self.x < leftBound) {
+ self.x = leftBound;
+ } else if (self.x > rightBound) {
+ self.x = rightBound;
}
};
});
ButtomSound
Sound effect
InitialLevel
Sound effect
ArrowCreated
Sound effect
sawcreated
Sound effect
Sawcharge
Sound effect
Ninjacreated
Sound effect
Ninjasepare
Sound effect
StarCreated
Sound effect
CircleCreated
Sound effect
HexagonCreated
Sound effect
GameplayMusic
Music