13 lines
291 B
GDScript
13 lines
291 B
GDScript
class_name SpellButton extends TextureButton
|
|
|
|
signal spellClicked(spellButton: SpellButton)
|
|
|
|
@export var spell: Spell
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
if (spell != null): texture_normal = spell.icon
|
|
|
|
func _pressed():
|
|
spellClicked.emit(self)
|