breadwinner/scenes/player/player_properties.gd

23 lines
581 B
GDScript3
Raw Normal View History

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