14 lines
493 B
GDScript3
14 lines
493 B
GDScript3
|
class_name SkillInstance
|
||
|
extends Node3D
|
||
|
|
||
|
func play_animation(animation_name: String, duration: float, speed: float):
|
||
|
var character := get_parent()
|
||
|
var animation := character.get_node("Animation") as AnimationComponent
|
||
|
animation.play_with_duration(animation_name, duration, speed)
|
||
|
|
||
|
func melee_damage(wait_time: float):
|
||
|
var area := get_node("Area")
|
||
|
await get_tree().create_timer(wait_time).timeout
|
||
|
area.monitoring = true
|
||
|
await get_tree().create_timer(0.1).timeout
|
||
|
area.monitoring = false
|