
- Added a win/lose condition - Added a finish state indicator. Transition currently does not work. - Fixed enemy animation durations for icy wind spell
18 lines
446 B
GDScript
18 lines
446 B
GDScript
extends Node2D
|
|
|
|
@onready var data: Data = $/root/Root/Data
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
data.player.connect("died", combatantDied)
|
|
data.opponent.connect("died", combatantDied)
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
pass
|
|
|
|
func combatantDied(victory: bool):
|
|
data.playing = false
|
|
if (victory): print("Victory")
|
|
else: print("Loss")
|