15 lines
331 B
GDScript
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
|