This commit is contained in:
2026-01-19 19:40:21 -06:00
parent f9a4f42821
commit 9223c7c32e
4 changed files with 5 additions and 5 deletions

View File

@@ -9,7 +9,7 @@
script = ExtResource("1_acaen")
actionBox = NodePath("UI/ActionBox")
battleFighterScenes = NodePath("Fighters")
cursorScenes = NodePath("")
cursorScenes = NodePath("UI/Cursors")
metadata/_custom_type_script = "uid://dihfp05x6pktn"
[node name="UI" type="Control" parent="."]

View File

@@ -34,7 +34,7 @@ func _process(delta: float) -> void:
func _updatePosition() -> void:
# Walk up the tree until BattleScene is found.
var battleScene:BattleScene = null
var currentNode:Node = self
var currentNode:Node = self.get_parent()
while currentNode != null:
if currentNode is BattleScene:
battleScene = currentNode
@@ -42,7 +42,7 @@ func _updatePosition() -> void:
currentNode = currentNode.get_parent()
if battleScene == null:
push_error("BattleCursorIcon could not find BattleScene in parent nodes.")
#push_error("BattleCursorIcon could not find BattleScene in parent nodes.")
return
var targetFighter:BattleFighterScene = battleScene.getFighterSceneAtPosition(battlePosition)

View File

@@ -3,7 +3,7 @@
[ext_resource type="Script" uid="uid://c2lye3hasxnkj" path="res://battle/ui/action/BattleCursorIcon.gd" id="1_cpfvx"]
[node name="Control" type="ColorRect"]
anchors_preset = -1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5