1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 16:14:22 +00:00
hella-farm/behaviours/collectible.gd

17 lines
383 B
GDScript3
Raw Normal View History

@icon("res://behaviours/collectible.svg")
extends Node
class_name Collectible
## How many of that item this [Collectible] represents.
@export var quantity: int = 1
## What kind of item this [Collectible] represents.
@export var kind: StringName = &""
@onready var game: MainGame = MainGame.get_via_group(self)
func apply():
game.inventory.get_counter(kind).increase(quantity)