cursor prep
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dy54m7dvjgqta"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dy54m7dvjgqta"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d1xyb0hdf1yeh" path="res://battle/fighter/BattleFighterScene.tscn" id="1_abr1f"]
|
||||
[ext_resource type="Script" uid="uid://dihfp05x6pktn" path="res://battle/BattleScene.gd" id="1_acaen"]
|
||||
[ext_resource type="PackedScene" uid="uid://ktmvnapibv2q" path="res://battle/ui/ActionBox.tscn" id="2_c3ndu"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4knowtushjly" path="res://battle/ui/BattleCursor.tscn" id="3_7s6t6"]
|
||||
|
||||
[node name="BattleScene" type="Node3D" node_paths=PackedStringArray("actionBox")]
|
||||
script = ExtResource("1_acaen")
|
||||
@@ -26,6 +27,9 @@ offset_right = 40.0
|
||||
offset_bottom = 12.0
|
||||
text = "Battle"
|
||||
|
||||
[node name="BattleCursor" parent="UI" instance=ExtResource("3_7s6t6")]
|
||||
layout_mode = 0
|
||||
|
||||
[node name="Fighters" type="Node" parent="."]
|
||||
|
||||
[node name="LeftTopBack" parent="Fighters" instance=ExtResource("1_abr1f")]
|
||||
|
||||
@@ -18,5 +18,5 @@ func perform(params:Dictionary) -> void:
|
||||
assert(params.has("targets"))
|
||||
pass
|
||||
|
||||
func canFighterUse(fighter:BattleFighter) -> bool:
|
||||
func canFighterUse(_fighter:BattleFighter) -> bool:
|
||||
return true
|
||||
@@ -114,4 +114,4 @@ func canMakeDecision() -> bool:
|
||||
return status != Status.DEAD
|
||||
|
||||
func canPlayerMakeDecision() -> bool:
|
||||
return isPlayerControlled() && canMakeDecision()
|
||||
return isPlayerControlled() && canMakeDecision()
|
||||
|
||||
11
battle/ui/BattleCursor.gd
Normal file
11
battle/ui/BattleCursor.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
class_name BattleCursor extends Control
|
||||
|
||||
@export var cursor:PackedScene
|
||||
|
||||
func setCursors(targets:Array[BattleSingleton.BattlePosition]) -> void:
|
||||
clearCursors()
|
||||
|
||||
func clearCursors() -> void:
|
||||
# Clear all children (cursors).
|
||||
for child in get_children():
|
||||
child.queue_free()
|
||||
1
battle/ui/BattleCursor.gd.uid
Normal file
1
battle/ui/BattleCursor.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cwnf5vqn3nb57
|
||||
12
battle/ui/BattleCursor.tscn
Normal file
12
battle/ui/BattleCursor.tscn
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c4knowtushjly"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cwnf5vqn3nb57" path="res://battle/ui/BattleCursor.gd" id="1_wsiei"]
|
||||
[ext_resource type="PackedScene" uid="uid://br2rs8skcn72l" path="res://battle/ui/BattleCursorCursor.tscn" id="2_6yv4v"]
|
||||
|
||||
[node name="BattleCursor" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 11.0
|
||||
offset_bottom = 11.0
|
||||
script = ExtResource("1_wsiei")
|
||||
cursor = ExtResource("2_6yv4v")
|
||||
6
battle/ui/BattleCursorCursor.tscn
Normal file
6
battle/ui/BattleCursorCursor.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://br2rs8skcn72l"]
|
||||
|
||||
[node name="Control" type="ColorRect"]
|
||||
offset_right = 8.0
|
||||
offset_bottom = 8.0
|
||||
color = Color(1, 0.478431, 1, 1)
|
||||
Reference in New Issue
Block a user