Setting up Shop (Gudbrand 04)

The app was going to have a shop where the user can buy hats, faces and colors for their avatar with the currency they are awarded for completing dishes in the campaign mode.

The shop will have buttons for buying the cosmetics they depict. They all have the price printed on them. When an item is bought by the user the price will jot be displayed, instead it will now say “Owned”. The cosmetics can then be used to change the look of the users avatar.

In the avatar changer the user can se all cosmetics in the app. The cosmetics that have not been bought yet will be grayed out. The selected cosmetics will have a check-mark. Here the user can click on the desired items to create the avatar they want from the items they own. I had to make sure to update the buttons whenever a button is clicked so that the checkmark moves to the clicked item in its category. To solve this, I have a function that checks for owned items, grays them out if they are not owned, this also removes the check-mark if it is moved. Finally it gives a check-mark to the selected items in their categories.

 

Gudbrand Wirstad Dynna

Kommentarer

Populære innlegg fra denne bloggen

Show me the Tables (Gudbrand 02)