Code edit (7 edits merged)
Please save this source code
User prompt
when player taps, remove the instructiontext from gui
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: center is not defined' in or related to this line: 'var instructionText = new Text2('Tap to jump to the next orbit.\nDon\'t hit the red obstacles.', {' Line Number: 227
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'gui')' in or related to this line: 'scoreTxt.LK.gui.top.addChild(scoreTxt);' Line Number: 216
Code edit (4 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'bottom')' in or related to this line: 'LK.top.bottom.addChild(instructionText);' Line Number: 236
Code edit (6 edits merged)
Please save this source code
User prompt
make sure instructionscreen is visible on stage at start
Code edit (1 edits merged)
Please save this source code
Code edit (19 edits merged)
Please save this source code
User prompt
At start, display white instruction text at screen bottom: "Tap to jump to the next orbit. Don't hit the red obstacles."
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'backgroundColor')' in or related to this line: 'game.set.backgroundColor = rainbowColors[12];' Line Number: 224
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'parent')' in or related to this line: 'if (obstacles[i].parent) {' Line Number: 276
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'parent')' in or related to this line: 'if (obstacles[i].parent) {' Line Number: 276
Code edit (4 edits merged)
Please save this source code
User prompt
modify ranbowcolors function to only create an array of 30 evenly distributed colors on a seamless rainbow
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: i is not defined' in or related to this line: 'var orbitGraphics = self.attachAsset('orbit1', {' Line Number: 89
===================================================================
--- original.js
+++ change.js
@@ -2,12 +2,11 @@
* Classes
****/
/****
TODO:
-* Make sure orbits are removed when they scale up enough. (to avoid lag)
+* Make sure that obstacles array, which holds references to obstacles in removed orbits, is regularly emptied of those.
* Make sure obstacles can't spawn directly on player angle with same speed at start, making first jump impossible.
* Maybe player should change orbit direction with the orbit he jumps into?
-* Make colors nicer, maybe cycle through them rainbow like instead of just random colors?
* Make sure orbits don't have too many obstacles (as currently possible).
* Maybe pause player and obstacle updating while scaling?
****/
// Player class