User prompt
Добавь бусты, которые увеличивают количество рыб за клик
User prompt
Add a menu at the bottom
User prompt
Add a game engineering menu object with full settings
User prompt
Add a menu bar at the bottom, where there will be sections with the boost of the octopus itself, a boost of fish growth, a boost of auto-click
User prompt
At the top, there should be a count of clicks on the octopus, that is, how many fish were clicked
User prompt
The fish should pour out from where you press
User prompt
Change the size of the octopus by 50 times
Initial prompt
Octopus Ds
===================================================================
--- original.js
+++ change.js
@@ -35,20 +35,23 @@
self.on('down', function (obj) {
var pos = obj.event.getLocalPosition(game);
self.emitFish(pos.x, pos.y);
});
+ self.fishBoost = 1;
self.emitFish = function (x, y) {
// Emit fish from the point where the octopus was clicked
- var angle = Math.random() * Math.PI * 2;
- var speed = 5 + Math.random() * 5;
- var fish = new Fish();
- fish.x = x;
- fish.y = y;
- fish.speedX = Math.cos(angle) * speed;
- fish.speedY = Math.sin(angle) * speed;
- game.addChild(fish);
+ for (var i = 0; i < self.fishBoost; i++) {
+ var angle = Math.random() * Math.PI * 2;
+ var speed = 5 + Math.random() * 5;
+ var fish = new Fish();
+ fish.x = x;
+ fish.y = y;
+ fish.speedX = Math.cos(angle) * speed;
+ fish.speedY = Math.sin(angle) * speed;
+ game.addChild(fish);
+ }
// Update the score counter
- LK.setScore(LK.getScore() + 1);
+ LK.setScore(LK.getScore() + self.fishBoost);
scoreTxt.setText(LK.getScore());
};
});
var Fish = Container.expand(function () {
@@ -94,9 +97,10 @@
self.addChild(gameSettingsButton);
var octopusBoostButton = new BoostButton();
octopusBoostButton.setLabel('Octopus Boost');
octopusBoostButton.setCallback(function () {
-// TODO: Implement octopus boost
+// Increase the fish boost multiplier
+octopus.fishBoost++;
});
octopusBoostButton.x = 2048 / 3;
self.addChild(octopusBoostButton);
var fishGrowthBoostButton = new BoostButton();