User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'addChild')' in this line: 'var skinHumidityBar = self.addChild(new SkinHumidityBar());' Line Number: 229
User prompt
show the skin humidty bar
User prompt
The order of all the bar have to be invert
User prompt
Make a bigger space bewten the bar
User prompt
The space bewten bar have to be bigger
User prompt
Make a little biger space betwen bar
User prompt
make all the bar with the same space to each other
User prompt
The skin humidity bar have to be closer to the other bar
User prompt
The skin humidity bar has to apair on the top to all other bar
User prompt
Ad a new bar with the same setting to all other bar name "SkinHumidityBar", the text is "skinhumidity", th bar have to apair after the fourth click and the launch apain after the fith click and is base to all the bar percent
User prompt
Fix Bug: 'Timeout.tick error: sixthFingerLabel is not defined' in this line: 'sixthFingerLabel.setText('Sixth Finger: ' + self.progress + '%');' Line Number: 43
User prompt
Fix Bug: 'ReferenceError: sixthFingerLabel is not defined' in this line: 'self.addChild(sixthFingerLabel);' Line Number: 11
User prompt
Fix Bug: 'ReferenceError: sixthFingerLabel is not defined' in this line: 'sixthFingerLabel.x = self.width / 2;' Line Number: 9
User prompt
Rename the sixfingerbar text to sixthfingerstrenght text
User prompt
Rename the sixfinger bar to sixthfingerbarstrenght
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'strength')' in this line: 'var totalProgress = self.powerBar.progress + self.windBar.strength + self.sixthFingerBar.progress;' Line Number: 256
User prompt
Make the launch power base on the percent of all the bar
User prompt
The launch is calculate base of the percent of all the power bar
User prompt
Make the launch at the fourth click
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'isShowing')' in this line: 'if (!stone.isLaunched && self.powerBar && self.powerBar.isShowing === false && clickCount === 1) {' Line Number: 245
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'isShowing')' in this line: 'if (!stone.isLaunched && self.powerBar && self.powerBar.isShowing === false && clickCount === 1) {' Line Number: 244
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'isShowing')' in this line: 'if (!stone.isLaunched && self.powerBar && self.powerBar.isShowing === false && clickCount === 1) {' Line Number: 243
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'isShowing')' in this line: 'if (!stone.isLaunched && self.powerBar && self.powerBar.isShowing === false && clickCount === 1) {' Line Number: 243
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'isShowing')' in this line: 'if (!stone.isLaunched && self.powerBar && !self.powerBar.visible && clickCount === 1) {' Line Number: 243
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'isShowing')' in this line: 'if (!stone.isLaunched && !self.powerBar.visible && clickCount === 1) {' Line Number: 242
var SixthFingerBar = Container.expand(function () {
var self = Container.call(this);
var sixthFingerBarGraphics = self.createAsset('sixthFingerBar', 'Sixth finger bar display', 0, 0.5);
var sixthFingerLabel = new Text2('Sixth Finger', {
size: 400,
fill: "#ffffff",
align: 'center'
});
sixthFingerLabel.x = self.width / 2;
sixthFingerLabel.y = -self.height;
self.addChild(sixthFingerLabel);
self.width = 375;
self.height = 75;
self.x = 1024 - self.width / 2;
self.y = 2732 - 300;
self.visible = false;
self.isShowing = false;
self.progress = 50;
self.show = function () {
self.visible = true;
self.isShowing = true;
self.incrementProgress = LK.setInterval(function () {
if (self.progress < 100 && self.direction !== -1) {
self.updateProgress(self.progress + 6);
} else if (self.progress >= 100) {
self.direction = -1;
}
if (self.progress > 0 && self.direction === -1) {
self.updateProgress(self.progress - 6);
} else if (self.progress <= 0) {
self.direction = 1;
}
}, 50);
};
self.hide = function () {
self.visible = false;
self.isShowing = false;
LK.clearInterval(self.incrementProgress);
};
self.updateProgress = function (value) {
self.progress = value;
sixthFingerBarGraphics.scale.x = self.progress / 100;
sixthFingerLabel.setText('Sixth Finger: ' + self.progress + '%');
};
});
var WindBar = Container.expand(function () {
var self = Container.call(this);
var windBarGraphics = self.createAsset('windBar', 'Wind bar display', 0, 0.5);
var windLabel = new Text2('Wind', {
size: 400,
fill: "#ffffff",
align: 'center'
});
windLabel.x = self.width / 2;
windLabel.y = -self.height;
self.addChild(windLabel);
self.width = 375;
self.height = 75;
self.x = 1024 - self.width / 2;
self.y = 2732 - 200;
self.visible = false;
self.isShowing = false;
self.strength = 50;
self.direction = 1;
self.show = function () {
self.visible = true;
self.isShowing = true;
self.updateWind = LK.setInterval(function () {
if (self.strength < 100 && self.direction !== -1) {
self.strength++;
} else if (self.strength >= 100) {
self.direction = -1;
}
if (self.strength > 1 && self.direction === -1) {
self.strength--;
} else if (self.strength <= 1) {
self.direction = 1;
}
windBarGraphics.scale.x = self.strength / 100;
windBarGraphics.scale.x *= self.direction;
windLabel.setText('Wind: ' + self.strength + '%');
}, 50);
};
self.hide = function () {
self.visible = false;
self.isShowing = false;
LK.clearInterval(self.updateWind);
};
self.updateWindDisplay = function () {};
});
var RestartButton = Container.expand(function () {
var self = Container.call(this);
var buttonGraphics = self.createAsset('restartButton', 'Restart button', 0.5, 0.5);
self.x = 2048 / 2;
self.y = 2732 - 200;
buttonGraphics.on('down', function () {
LK.showGameOver();
});
});
var PowerBar = Container.expand(function () {
var self = Container.call(this);
var powerBarGraphics = self.createAsset('powerBar', 'Power bar display', 0, 0.5);
var powerLabel = new Text2('Power', {
size: 400,
fill: "#ffffff",
align: 'center'
});
powerLabel.x = self.width / 2;
powerLabel.y = -self.height;
self.addChild(powerLabel);
self.width = 375;
self.height = 75;
self.x = 1024 - self.width / 2;
self.y = 2732 - 100;
self.visible = false;
self.isShowing = false;
self.progress = 50;
self.show = function () {
self.visible = true;
self.isShowing = true;
self.incrementProgress = LK.setInterval(function () {
if (self.progress < 100 && self.direction !== -1) {
self.updateProgress(self.progress + 6);
} else if (self.progress >= 100) {
self.direction = -1;
}
if (self.progress > 0 && self.direction === -1) {
self.updateProgress(self.progress - 6);
} else if (self.progress <= 0) {
self.direction = 1;
}
}, 50);
};
self.hide = function () {
self.visible = false;
self.isShowing = false;
LK.clearInterval(self.incrementProgress);
};
self.updateProgress = function (value) {
self.progress = value;
powerBarGraphics.scale.x = self.progress / 100;
powerLabel.setText('Power: ' + self.progress + '%');
};
});
var Hand = Container.expand(function () {
var self = Container.call(this);
self.move = function (position, stone) {
self.x = position.x;
if (!stone.isLaunched) {
stone.x = self.x;
}
};
var handGraphics = self.createAsset('hand', 'Moving hand at the bottom', 0.5, 0.5);
self.x = 0;
self.y = 2732 - handGraphics.height / 2;
self.direction = 1;
self.speed = 5;
});
var Stone = Container.expand(function () {
var self = Container.call(this);
self.launch = function (hand, power) {
self.x = hand.x;
self.y = hand.y;
self.direction = -Math.PI / 2;
self.launchPower = power * 0.24;
self.speed = self.launchPower;
self.isLaunched = true;
self.distanceTraveled = 0;
LK.setScore(0);
};
var stoneGraphics = self.createAsset('stone', 'Stone for ricochet', .5, .5);
self.speed = 0;
self.direction = 0;
self.isLaunched = false;
self.move = function () {
self.x += self.speed * Math.cos(self.direction);
self.y += self.speed * Math.sin(self.direction);
self.speed *= 0.95;
if (self.isLaunched) {
self.distanceTraveled += self.speed;
LK.setScore(Math.floor(self.distanceTraveled));
if (self.speed < 0.1) {
if (Math.random() < 0.2) {
var bouncePower = self.launchPower * (0.1 + Math.random() * 0.8);
self.speed = bouncePower;
self.direction = -Math.PI / 2;
} else {
LK.showGameOver();
self.isLaunched = false;
}
}
}
};
});
var Lake = Container.expand(function () {
var self = Container.call(this);
var lakeGraphics = self.createAsset('lake', 'Lake for stone ricochet', .5, .5);
self.checkRicochet = function (stone) {
if (stone.intersects(this)) {
return true;
}
return false;
};
});
var Game = Container.expand(function () {
var self = Container.call(this);
self.powerBar = null;
LK.stageContainer.setBackgroundColor(0x008080);
var lake = self.addChild(new Lake());
lake.x = 2048 / 2;
lake.y = 2732 / 2;
var hand = self.addChild(new Hand());
self.powerBar = self.addChild(new PowerBar());
var stone = self.addChild(new Stone());
stone.x = hand.x;
stone.y = hand.y;
var scoreTxt = new Text2('0', {
size: 120,
fill: "#ffffff"
});
LK.gui.topCenter.addChild(scoreTxt);
var isGameOver = false;
var ricochets = 0;
var restartButton = self.addChild(new RestartButton());
restartButton.visible = false;
LK.on('tick', function () {
if (!stone.isLaunched) {}
stone.move();
if (!isGameOver) {
scoreTxt.setText(LK.getScore());
}
});
var clickCount = 0;
stage.on('down', function (obj) {
clickCount++;
if (clickCount === 2) {
var windBar = self.addChild(new WindBar());
windBar.show();
} else if (clickCount === 3) {
var sixthFingerBar = self.addChild(new SixthFingerBar());
sixthFingerBar.show();
}
if (!stone.isLaunched && self.powerBar && !self.powerBar.visible && clickCount === 1) {
self.powerBar.show();
} else if (!stone.isLaunched && sixthFingerBar.isShowing && clickCount === 4) {
stone.launch(hand, sixthFingerBar.progress);
sixthFingerBar.hide();
}
});
stage.on('move', function (obj) {
var event = obj.event;
var pos = event.getLocalPosition(self);
hand.move({
x: pos.x
}, stone);
});
});
A nice lake Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A hand Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A small stone Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A power bar Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A power bar Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A restart button Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.