add attack cooldown and hit window

This commit is contained in:
2025-02-25 00:47:40 +10:00
parent 2da0820964
commit 20517af12e
3 changed files with 46 additions and 4 deletions

View File

@@ -3,6 +3,8 @@ extends RefCounted
const MARGIN = 0.01
var is_visible: bool = true
var _mesh_nodes: Array[MeshInstance3D] = []
@@ -56,6 +58,12 @@ func init(children: Array[Node], parent: Node, material: Material) -> void:
Debugger.mode_changed.connect(_on_debugger_mode_changed)
func set_visibility(visible: bool) -> void:
is_visible = visible
for node in _mesh_nodes:
node.visible = is_visible
func _on_debugger_mode_changed(mode: Debugger.Mode) -> void:
for mesh_node in _mesh_nodes:
mesh_node.visible = mode == Debugger.Mode.FULL