2024-02-12 23:22:27 +00:00
|
|
|
class_name SkillsComponent
|
|
|
|
extends Node
|
|
|
|
|
|
|
|
var player: Player
|
2024-02-13 10:17:45 +00:00
|
|
|
var area: Area3D
|
2024-02-12 23:22:27 +00:00
|
|
|
|
|
|
|
func _ready():
|
|
|
|
player = owner
|
2024-02-13 10:17:45 +00:00
|
|
|
area = %MeleeArea
|
2024-02-12 23:22:27 +00:00
|
|
|
player.attacked.connect(attack)
|
|
|
|
|
|
|
|
func attack():
|
2024-02-13 09:38:26 +00:00
|
|
|
await get_tree().create_timer(0.5).timeout
|
|
|
|
area.monitoring = true
|
|
|
|
await get_tree().create_timer(0.1).timeout
|
|
|
|
area.monitoring = false
|