
- Converted the rock throw animation to the new system - Converted the fireball animation to the new system (needs to be inverted still) - Spell variable now get set to null after use or they get interrupted - Made some code more readable
21 lines
470 B
GDScript
21 lines
470 B
GDScript
class_name AnimationBase extends Node2D
|
|
|
|
signal animationFinished(spell: Spell)
|
|
|
|
@export var inverted: bool = false
|
|
@export var index: int = -1
|
|
@export var finalIndex: int = 0
|
|
@export var spell: Spell
|
|
var attackName: String = "attackSegment"
|
|
var inverseName: String = "attackInverse"
|
|
|
|
var targetProg: float
|
|
var finalProg: float
|
|
|
|
func castFailed() -> void:
|
|
pass
|
|
|
|
func setProgress(target: float, final: float = finalProg) -> void:
|
|
targetProg = target
|
|
finalProg = final
|