Code edit (5 edits merged)
Please save this source code
User prompt
add a new button at bottom right for punch
Code edit (5 edits merged)
Please save this source code
User prompt
only move the human player with joystick
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: base is not defined' in or related to this line: 'var dx = localPos.x - base.x;' Line Number: 34
User prompt
Please fix the bug: 'ReferenceError: base is not defined' in or related to this line: 'var maxDistance = base.width / 2; // Max distance knob can move from center' Line Number: 31
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: joystick.knob is undefined' in or related to this line: 'var joystickDx = joystick.knob.x;' Line Number: 188
User prompt
make the player move using the joystick
Code edit (1 edits merged)
Please save this source code
User prompt
instruction knob.intersects(localPos) isn't normal, the knob should follow the user move until the base limit
User prompt
fix the joystick
User prompt
Please fix the bug: 'TypeError: knob.hitTest is not a function' in or related to this line: 'if (knob.hitTest(localPos)) {' Line Number: 34
User prompt
replace swipe system by the joystick system
User prompt
Please fix the bug: 'TypeError: knob.containsPoint is not a function' in or related to this line: 'if (knob.containsPoint(localPos)) {' Line Number: 34
User prompt
add a control joystick at the bottom left
Code edit (16 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: punchDistance is not defined' in or related to this line: 'self.leftArm.height += punchDistance;' Line Number: 119
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
log player.width when down
Code edit (3 edits merged)
Please save this source code
User prompt
set also swipeStart in 'down' event
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -200,9 +200,9 @@
anchorX: 0.5,
anchorY: 0.5
});
self.x = game.width - 150; // Position button on the bottom right
- self.y = game.height - 100;
+ self.y = game.height - 300;
self.down = function (x, y, obj) {
player.punch(true); // Trigger punch action for the player
};
});
clear
basic light gray convex round button with a red boxing glove icon. UI
Un gant de boxe bleu vu de dessus. video game
basic light round convex gray button with a raised blue shield icon.. UI
un éclair. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
remove
a basic white heart.. game icon
A boxer has lost the match..
man boxer with red gloves is KO on the ring..