In this section, we will cover the process of buying upgrades for our player's ship. This includes the following:
- Credit balance
- Option to buy
- Letting the player know the item has been sold
The following screenshot shows our shop scene with its selection grid and two purchased items marked as SOLD. Above the selection grid, to the left, is the user's current in-game bank balance and an image showing what the player's ship currently looks like with the two upgrades applied. Lastly, to the right is the option to buy the currently selected item, which is C. Bomb:
In this section, we will return to the script that is responsible for purchasing upgrades and applying them to the player's ship. In the PlayerShipBuild script, we will add global variables that will hold the player's weapon upgrades in an array, as well as game...