14 lines
493 B
GDScript3
Raw Normal View History

2024-02-13 22:12:32 +00:00
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