Added skill system
This commit is contained in:
14
client/skill/SkillInstance.gd
Normal file
14
client/skill/SkillInstance.gd
Normal 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
|
Reference in New Issue
Block a user