breadwinner/scenes/player/player_properties.gd
Balogh Krisztián 0ddbcf7744 major refactor + concept
- refactored the main player controller script into smaller components for readability
- refactored the file structure and added folder coloring
- added lore and concept for future reference
2026-07-29 00:05:40 +02:00

22 lines
581 B
GDScript

extends Node
@export_category("Inventory")
@export var INVENTORY_MAX = 3 ##max number of items that can be in the player's inventory
@export var INVENTORY_ITEMS: Array = [] ##the items in the player's inventory
var stamina: float = 100.0
var selected_item: int = 0
var stamina_recharge: bool = true
func stamina_recharge_off():
stamina_recharge = false
func select_item(index:int):
selected_item = index
func _process(delta: float) -> void:
if stamina_recharge:
stamina = move_toward(stamina, 100, .5)
func _on_stamina_reset_timeout() -> void:
stamina_recharge = true