User prompt
refresh the shop price to N.A. after an item is bought
User prompt
if the max for an item has been reached change the price to N.A.
User prompt
add a max of 1 to each items
User prompt
add a maximum amount that an item can be bought, add it for each individual item
User prompt
where has the shop icon gone, add it back
User prompt
Fix Bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'maxPurchases')' in or related to this line: 'self.maxPurchases = maxPurchases;' Line Number: 70
User prompt
add a maximum amount that an item can be bought, add it for each individual item
User prompt
add a maximum amount that an item can be bought
User prompt
make the flashes milder
User prompt
if the mouse is clicked anywhere else than the shop background or icon put the shop away
User prompt
on the bottom side of the screen display what items are activated
User prompt
add a function for how to earn coins, in this case it should be a button that adds 50 coins
User prompt
subtract the cost of the item with the total coins
User prompt
if the player clicks on an item, check if he can afford that item. if not flash the screen red. if it can afford it then flash the screen green and execute the funtion the belongs to that item
User prompt
display the amount of coins in the top middle
User prompt
add objects for each seperate item and display them in the shop
User prompt
make an object for each seperate item in the code
User prompt
fix the color not changing like stated above
User prompt
when the shop window gets opened check the current coins and change the color of the text accordingly
User prompt
add a score on the top middle that displays the amount of coins you have
User prompt
if the item is unaffordable make the text red, if it is affordable make it white
User prompt
replace the current objects that display the affortability by text boxes that indicate the price and change color if it is affortable
User prompt
Fix Bug: 'Uncaught ReferenceError: ShopItem is not defined' in or related to this line: 'var Item1 = ShopItem.expand(function (price) {' Line Number: 12
User prompt
make each item have their own object
User prompt
make the items display in rows of 3
===================================================================
--- original.js
+++ change.js
@@ -52,8 +52,12 @@
LK.effects.flashScreen(0x00ff00, 300);
// Execute the function that belongs to this item
// This is a placeholder for the actual function
self.itemFunction();
+ // Update the price text to N.A. if the item has been bought
+ if (self.purchaseCount >= self.maxPurchase) {
+ self.priceText.setText('N.A.');
+ }
} else {
LK.effects.flashScreen(0xff0000, 300);
}
});