delurbelako/scripts/inventory/stack.gd
2025-10-12 16:41:34 +05:00

15 lines
331 B
GDScript

extends RefCounted
## Structure of item and amount of it. Basic object that more complex exchange
class_name Stack
func _init(item: Item = null, amount: int = 0) -> void:
held_item = item
self.amount = amount
## Item in stack
@export_storage var held_item : Item
## Amount of items in stack
@export_storage var amount : int