1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-27 18:44:23 +00:00
hella-farm/behaviours/collectible.gd

17 lines
No EOL
383 B
GDScript

@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)