User prompt
Delete mango tree and assets
User prompt
Please fix the bug: 'ReferenceError: mangoTree is not defined' in or related to this line: 'newMango.x = mangoTree.x;' Line Number: 64
User prompt
Delete mango tree
User prompt
Please fix the bug: 'ReferenceError: mangoTree is not defined' in or related to this line: 'newMango.x = mangoTree.x;' Line Number: 64
User prompt
Delete mango tree
User prompt
I control my player with touch
User prompt
Big mango tree in background
Initial prompt
Mango & Monkey
===================================================================
--- original.js
+++ change.js
@@ -38,8 +38,15 @@
// Initialize the monkey and the mango tree
var monkey = game.addChild(new Monkey());
monkey.x = 1024; // Position the monkey at the center of the screen
monkey.y = 2732 - monkey.height; // Position the monkey at the bottom of the screen
+// Add touch control to the monkey
+game.down = function (x, y, obj) {
+ monkey.x = x;
+};
+game.move = function (x, y, obj) {
+ monkey.x = x;
+};
var mangoTree = game.attachAsset('mangoTree', {
anchorX: 0.5,
anchorY: 1
});