Send Spells to SpellHolder Node

main
Luna Brovchuk 2023-10-02 18:59:52 +02:00
parent e53edf82a3
commit ea348bdbbf
2 changed files with 14 additions and 0 deletions

View File

@ -15,5 +15,6 @@ func _ready():
func select_hover(node):
game.selected_card = id
game.selected_modifier = $Card.frame
$AudioCardSelect.play()

View File

@ -1,6 +1,7 @@
extends Node
var selected_card = null
var selected_modifier = 0
var difficulty = 0
var last_diff = 0
var mob_preloads = [
@ -12,6 +13,17 @@ var mob_preloads = [
var mob_timers = [.0, .0, .0, .0]
var mob_threshold = [5, 7, 10, 7]
var spells = [
"ricochet",
"big_magic",
"explode",
"fireball",
"freeze",
"poison",
"quick_magic",
"rapidfire",
]
func _ready():
Global.playing = true
Global.play_time = 55.0
@ -54,5 +66,6 @@ func _physics_process(delta):
func select_card():
if selected_card != null:
$"../Center/SpellHolder".add_modifier(spells[selected_modifier])
Global.playing = true
$UIWrapper/UI/Cards.visible = false