Finished basic PickupableItem

This commit is contained in:
Alexey 2025-08-01 13:11:26 +03:00
commit 88c56f8aed
21 changed files with 163 additions and 35 deletions

View file

@ -1,13 +1,10 @@
extends Resource
extends IdentifiedResource
class_name BasePickupableResource
## Item ID, make sure it's unique
@export var id: StringName
## Texture that will be used in node sprite
@export var texture: Texture2D
## Emitted when item picked up. Returns if PickupableItem should be freed
func _apply(_player: Player) -> bool:
return true
## Emitted when item picked up. Returns IdentifiedResource if it should be swapped
func _apply(_player: Player) -> IdentifiedResource:
return null