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
@@ -8,18 +8,19 @@
anchorY: 0.5
});
self.x = 2048 / 2;
self.y = 2732 / 2;
- self.on('down', function () {
- self.emitFish();
+ self.on('down', function (obj) {
+ var pos = obj.event.getLocalPosition(game);
+ self.emitFish(pos.x, pos.y);
});
- self.emitFish = function () {
- // Emit fish in a random direction
+ 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 = self.x;
- fish.y = self.y;
+ fish.x = x;
+ fish.y = y;
fish.speedX = Math.cos(angle) * speed;
fish.speedY = Math.sin(angle) * speed;
game.addChild(fish);
};