User prompt
Reduce tubes size from ~30%
User prompt
Adjust time anchor as it’s not totally visible
User prompt
Remove labels “Score :” and “Time:” keep only numbers
User prompt
Fix liquid height when poured in an empty tube
User prompt
Adapt the tube selection scaling to the new sizes
User prompt
Fix the tube selection scaling
User prompt
When pouring a liquid to a tube the resulting width should not change
User prompt
Add a little offset to liquids y so they don’t appear out of the tubes bottom
User prompt
Fix tubes y position to be centered
User prompt
Center tubes vertically
User prompt
Fix horizontal distribution of tubes
User prompt
Fix there’s now 4 tubes instead of 3
User prompt
Fix : only one tube is visible
User prompt
Distribute the tubes horizontally on the screen
User prompt
Center the tubes but let an even space between them
User prompt
Center tubes in the screen
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'if (self.liquids.length === 0 || self.liquids[self.liquids.length - 1].color === topLiquid.color) {' Line Number: 55
User prompt
double the size of liquids and tubes
User prompt
Set tubeGraphics to 0.6
User prompt
Use addchildat to always have tubeGraphics in the foreground
User prompt
Fix liquids positions, they should be in the bottom of tubes
User prompt
Adapt to use anchorY 0 instead of 1
Code edit (1 edits merged)
Please save this source code
User prompt
Add a second green liquid in 2nd tube
User prompt
For first level don’t add red and blue liquid in tubes
/**** * Classes ****/ var Liquid = Container.expand(function (color) { var self = Container.call(this); var liquidGraphics = self.attachAsset(color, { anchorX: 0.5, anchorY: 0.0 }); return self; }); //<Assets used in the game will automatically appear here> var Tube = Container.expand(function () { var self = Container.call(this); var tubeGraphics = self.attachAsset('tube', { anchorX: 0.5, anchorY: 0.0 }); self.liquids = []; self.addLiquid = function (liquid) { self.liquids.push(liquid); self.addChild(liquid); self.updateLiquids(); }; self.removeLiquid = function () { var liquid = self.liquids.pop(); self.removeChild(liquid); self.updateLiquids(); return liquid; }; self.updateLiquids = function () { for (var i = 0; i < self.liquids.length; i++) { self.liquids[i].y = tubeGraphics.height - (i + 1) * 100; } }; self.containsPoint = function (point) { var bounds = self.getBounds(); return point.x >= bounds.x && point.x <= bounds.x + bounds.width && point.y >= bounds.y && point.y <= bounds.y + bounds.height; }; self.down = function (x, y, obj) { if (selectedTube) { if (selectedTube !== self && self.liquids.length < 4) { var topLiquid = selectedTube.liquids[selectedTube.liquids.length - 1]; if (self.liquids.length === 0 || self.liquids[self.liquids.length - 1].color === topLiquid.color) { self.addLiquid(selectedTube.removeLiquid()); } } selectedTube.scale.set(1, 1); // Reset the scale of the previously selected tube selectedTube = null; } else { selectedTube = self; selectedTube.scale.set(1.2, 1.2); // Increase the scale of the selected tube } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ var tubes = []; var selectedTube = null; var liquids = []; var timeLeft = 60; // Initialize the timer with 60 seconds var score = 0; // Initialize the score with 0 var scoreTxt = new Text2('Score: 0', { size: 100, fill: "#ffffff" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Create timer display var timerTxt = new Text2('Time: 60', { size: 100, fill: "#ffffff" }); timerTxt.anchor.set(0.5, 0); LK.gui.topRight.addChild(timerTxt); // Function to update score function updateScore(newScore) { score = newScore; scoreTxt.setText('Score: ' + score); } // Function to update timer function updateTimer(newTime) { timeLeft = newTime; timerTxt.setText('Time: ' + timeLeft); } function createTube(x, y) { var newTube = new Tube(); newTube.x = x; newTube.y = y; tubes.push(newTube); game.addChild(newTube); } function createLiquid(color) { var liquid = new Liquid(color); liquid.color = color; return liquid; } // Create initial tubes createTube(300, 1500); createTube(600, 1500); createTube(900, 1500); tubes[0].addLiquid(createLiquid('liquidGreen')); tubes[1].addLiquid(createLiquid('liquidGreen')); // Game update function game.update = function () { // Update timer if (LK.ticks % 60 == 0) { // Decrease time every second updateTimer(timeLeft - 1); if (timeLeft <= 0) { if (selectedTube) { selectedTube.scale.set(1, 1); // Reset the scale of the selected tube } LK.showGameOver(); } } };
===================================================================
--- original.js
+++ change.js
@@ -29,9 +29,9 @@
return liquid;
};
self.updateLiquids = function () {
for (var i = 0; i < self.liquids.length; i++) {
- self.liquids[i].y = -i * 100 - tubeGraphics.height;
+ self.liquids[i].y = tubeGraphics.height - (i + 1) * 100;
}
};
self.containsPoint = function (point) {
var bounds = self.getBounds();
Basic white Restart icon (rounded arrow). UI
Une classe d’une école de sorcière sans les élèves.
un sablier de sorcière.
a bubble.
exploded broken glass
Yound generously beautifull teacher witch smiling, with glasses, a black witch hat, holding a little brown book in her hands and looking at the camera. wearing light black clothes. Torso head and hat should appear.
tap
Sound effect
drop
Sound effect
reset
Sound effect
wrong
Sound effect
yes
Sound effect
goodJob
Sound effect
pouring
Sound effect
welcome
Sound effect
rememberTheRules
Sound effect
letsgo
Sound effect
hurryUp
Sound effect
boom
Sound effect
tryAgain
Sound effect
rainbowBoom
Sound effect
youDidIt
Sound effect
letmetry
Sound effect
rainbowMix
Sound effect
thankYou1
Sound effect
thankYou2
Sound effect
thankYou3
Sound effect
thankYou4
Sound effect
bonusTime
Sound effect