User prompt
Coloca ele na esquerda.
User prompt
Está dando muito lag.
User prompt
Por que ele tá dando tantas moedas? Era pra ele só dar uma.
User prompt
Please fix the bug: 'ReferenceError: spriteIndex is not defined' in or related to this line: 'if (person1.isWalking && spriteIndex == 0) {' Line Number: 163
User prompt
Ele tá dando muito mais que uma moeda.
User prompt
O caminho desconhecido, basicamente você pode comprar coisas, como aumentar o ganho de moedas por clique ou moedas por segundo.
User prompt
Adicione o Sprite 1 do cara desconhecido que quando clicado vai para o Sprite 2
User prompt
Please fix the bug: 'ReferenceError: person1 is not defined' in or related to this line: 'person1.x += 5;' Line Number: 157
User prompt
Please fix the bug: 'TypeError: person1.walk is not a function' in or related to this line: 'person1.walk();' Line Number: 160
User prompt
Não, não era pra mudar o ácide da pessoa. Era pra só colocar ele. Traga o Sprite da pessoa de volta.
User prompt
Coloque o ácido da pessoa de volta, porque ela tá com o mesmo spray que o cara desconhecido.
User prompt
Faça com que o asset da pessoa 1 volte ao normal
User prompt
Faça com que o asset da pessoa 1 seja o outro sprite em vez do cara desconhecido
User prompt
Please fix the bug: 'TypeError: person1.walk is not a function' in or related to this line: 'person1.walk();' Line Number: 196
User prompt
Please fix the bug: 'TypeError: person1.walk is not a function' in or related to this line: 'person1.walk();' Line Number: 196
User prompt
Coloquei no solo.
User prompt
Passa que quando o cara desconhecido abre a jaqueta, abre uma aba de loja que pode aumentar o ganho de moedas, melhorando o moeda ganho.
User prompt
Please fix the bug: 'LK.setCoinGain is not a function' in or related to this line: 'LK.setCoinGain(1);' Line Number: 176
User prompt
Please fix the bug: 'Uncaught TypeError: LK.getCoinGain is not a function' in or related to this line: 'LK.setCoinGain(LK.getCoinGain() + 1);' Line Number: 112
User prompt
Coloca ele no topo do cara desconhecido.
User prompt
Coloca a loja no topo do cara desconhecido.
===================================================================
--- original.js
+++ change.js
@@ -81,8 +81,23 @@
scaleY: clickableObject.height / 185.51
});
};
});
+// Class for the Store
+var Store = Container.expand(function () {
+ var self = Container.call(this);
+ var storeGraphics = self.attachAsset('Store', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 1,
+ scaleY: 1
+ });
+ // Event handler for when the store is clicked
+ self.down = function (x, y, obj) {
+ // Increase coin gain
+ LK.setCoinGain(LK.getCoinGain() + 1);
+ };
+});
// Define person1 in the global scope
// Define spriteIndex in the global scope
// Class for UnknownGuy
var UnknownGuy = Container.expand(function () {
@@ -104,14 +119,21 @@
anchorY: 0.5,
scaleX: 1,
scaleY: 1
});
- // Create a new coin and add it to the game
- var coin = game.addChild(new Coin());
- coin.x = self.x;
- coin.y = self.y;
- // Animate the coin dropping into the vase
- coin.drop();
+ // If the unknown guy opens his jacket, open the store
+ if (spriteIndex == 1) {
+ var store = game.addChild(new Store());
+ store.x = self.x;
+ store.y = self.y;
+ } else {
+ // Create a new coin and add it to the game
+ var coin = game.addChild(new Coin());
+ coin.x = self.x;
+ coin.y = self.y;
+ // Animate the coin dropping into the vase
+ coin.drop();
+ }
};
// Add walk function
self.walk = function () {
// Cycle through the sprites for the walking animation
@@ -134,8 +156,10 @@
/****
* Game Code
****/
+// Initialize coin gain
+LK.setCoinGain(1);
// Event handler for when the game is clicked
game.down = function (x, y, obj) {
// Create a new coin and add it to the game
var coin = game.addChild(new Coin());