1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-23 00:24:21 +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)