Added skill system

This commit is contained in:
2024-02-13 23:12:32 +01:00
parent cf155d9aab
commit d87d4c9e3f
15 changed files with 117 additions and 43 deletions

View File

@ -0,0 +1,14 @@
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