1. Upload an block images to the Assets folder in Repl
- Find the downloaded images. Need help?
- Open the asset folder in repl, click:
code > client > asset
- Click and drag your files into this folder. Make sure your files are named something very easy and obvious (it is best to not use spaces or symbols), for example “zombies.png” or “shark.png”.
StoreItem’s inside the
new g.StoreItem('block3.png', '3 Block', 'Points', 3, 'buy3'), new g.StoreItem('block5.png', '5 Block', 'Points', 4, 'buy5'),
room.js, Create the Buy Actions in the
buy3: () => g.purchase(player, 'score', 3, 'block3s', 1), buy5: () => g.purchase(player, 'score', 4, 'block5s', 1),