Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
let the fontain rotate indefinetly
Code edit (5 edits merged)
Please save this source code
User prompt
and make the fontain rotate
User prompt
For the end tile, for the water animation use the fountain asset and make grow w & h
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
For start pipe, in update, instead of a water w/h anim, make the valve rotate
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: 'Uncaught TypeError: Cannot read properties of undefined (reading 'type')' in or related to this line: 'log('Flowing through pipe at:', key, 'Tile type:', tile.type);' Line Number: 510
User prompt
add log in flowThroughPipe
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: _slicedToArray is not defined' in or related to this line: 'var _pos$split$map = pos.split(',').map(Number),' Line Number: 283
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: setInterval is not a function' in or related to this line: 'var checkFlowInterval = setInterval(function () {' Line Number: 628
User prompt
in animateWaterFlow, set flow to true in start tile and wait until flow returns to false; then do same for the next tile until the end pipe tile.
User prompt
When puzzle is solved we will run an animation to simulate water flowing from start pipe to end pipe. Add a new function for flow animation; call it when puzzle is solved;
User prompt
prevent moves when !isPlaying
User prompt
add an isPlaying global defaulting to true; set it to false when level is solved
User prompt
Please fix the bug: 'Uncaught TypeError: Set is not a constructor' in or related to this line: 'var visited = new Set();' Line Number: 438
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'currentLevel')' in or related to this line: 'levelText = new Text2('Level: ' + puzzleManager.currentLevel, {' Line Number: 726
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'setText')' in or related to this line: 'levelText.setText('Level: ' + self.currentLevel + ' Solved!');' Line Number: 592
===================================================================
--- original.js
+++ change.js
@@ -555,8 +555,9 @@
// Check if puzzle is solved
if (self.checkWinCondition()) {
self.startWaterFlow();
levelText.setText('Level: ' + self.currentLevel + ' Solved!');
+ isPlaying = false;
}
};
self.startWaterFlow = function () {
// Find start tile and enable water flow
@@ -626,8 +627,9 @@
var tileSize = 400;
var boardOffsetX = 90;
var boardOffsetY = 90;
// Game state
+var isPlaying = true;
var gridBoard;
var puzzleManager;
var isMouseDown = false;
var startX = 0;
straigth zenith view square light wooden pallet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
straigth zenith view square wooden pallet with big screws in each corner Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
simple yellow rating star. Modern video game style
tileSlide
Sound effect
levelWon
Sound effect
tileBlocked
Sound effect
fountain
Sound effect
waterInPipe
Sound effect
bgMusic
Music
logoBounce
Sound effect
levelStart
Sound effect
bgMusic2
Music
flowerPop
Sound effect
roundResult
Sound effect
gameWon
Sound effect
resetSound
Sound effect
birds
Sound effect
birds2
Sound effect
birds3
Sound effect