tienda/) allows players to spend coins earned from minigames to unlock and equip character customizations. These customizations are immediately reflected in the main menu and throughout the game.
Shop Scene Structure
Available Items
Accessories (Accesorios)
Worn on the character’s head/body:tienda/Script/store_menu.gd
Shells (Caparazones)
Change the character’s body color:Shop UI Flow
Opening the Shop
From the main menu:scripts/main_menu.gd
Initialization
tienda/Script/store_menu.gd
Purchase System
Item Info Panel
Clicking an item opens a detailed info panel:Button States
The purchase/equip button has three states:Buying Items
Equipping Items
Visual Updates
Main Menu Character
When returning to the main menu, the character sprite updates to reflect equipped items:scripts/main_menu.gd
Applying Texture to Animation
The character usesAnimatedSprite2D with AtlasTexture frames:
Texture Naming Convention
All character textures follow this pattern:spr_rest.png- Default (no customization)spr_rest_blue.png- Blue shell, no accessoryspr_rest_corona.png- Default shell, crown accessoryspr_rest_blue_corona.png- Blue shell + crownspr_rest_purple_lentes.png- Purple shell + glasses
Category Switching
Players can toggle between accessories and shells:Audio Feedback
Button Visual Effects
The purchase button has a press animation:Returning to Main Menu
update_menu_skin() in _ready(), so changes are immediately visible.
Complete Purchase Flow Example
-
Player clicks “Corona” item
_show_item_info(accesories[0])is called- Info panel shows: “Corona, Precio: 25 monedas”
- Button shows “COMPRAR” (if not owned)
-
Player clicks “COMPRAR”
_on_buy_item()checks if player has 25+ coins- If yes:
- Adds “Corona” to inventory via
ScoreManager.add_to_inventory() - Deducts 25 coins via
ScoreManager.add_coins(-25) - Updates coin display
- Plays success sound
- Refreshes panel (button now shows “EQUIPAR”)
- Adds “Corona” to inventory via
-
Player clicks “EQUIPAR”
_on_equip_item()callsScoreManager.equip_item("accesorio", "Corona")- ScoreManager saves equipped state
- Emits
skin_updatedsignal - Panel refreshes (button now shows “EQUIPADO” and is disabled)
-
Player returns to main menu
- Main menu loads
update_menu_skin()reads equipped items- Loads
spr_rest_corona.png(or combined texture) - Character visually updates
Common Issues
Texture Not Found
- Base textures for each shell color
- Combined textures for each accessory + shell combination
- Follow exact naming convention
Items Not Persisting
If purchases don’t save:- Check that
ScoreManager.save_to_file()is called inadd_to_inventory()✓ - Verify
user://high_scores.cfgis writable - Check console for save errors
Button Not Updating
If button state doesn’t change after purchase:- Ensure
_show_item_info(item)is called after purchase - Clear previous button connections before adding new ones
- Check that
ScoreManager.is_equipped()returns correct value