Raise-Your-Wand/Scripts/SpellButton.gd
2024-05-27 13:05:36 -04:00

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)