mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-22 07:44:17 +00:00
24 lines
278 B
GDScript3
24 lines
278 B
GDScript3
|
extends Node
|
||
|
class_name Collectible
|
||
|
|
||
|
enum CollectibleType {
|
||
|
UNSET,
|
||
|
COIN_COPPER,
|
||
|
COIN_SILVER,
|
||
|
COIN_GOLD,
|
||
|
GEM,
|
||
|
DIAMOND,
|
||
|
COAL,
|
||
|
CROWN,
|
||
|
SUPERCROWN,
|
||
|
}
|
||
|
|
||
|
@export var type: CollectibleType
|
||
|
|
||
|
signal collected
|
||
|
|
||
|
|
||
|
func collect():
|
||
|
emit_signal("collected")
|
||
|
get_parent().queue_free()
|