Fix string for next floor on load screen to use display string name of next floor
This commit is contained in:
@@ -30,6 +30,8 @@ public interface IMap : INode3D
|
|||||||
|
|
||||||
AutoProp<string> CurrentFloorDisplayString { get; }
|
AutoProp<string> CurrentFloorDisplayString { get; }
|
||||||
|
|
||||||
|
public string NextFloorDisplayString { get; }
|
||||||
|
|
||||||
public event Action<(Vector3 Rotation, Vector3 Position)> SpawnPointCreated;
|
public event Action<(Vector3 Rotation, Vector3 Position)> SpawnPointCreated;
|
||||||
|
|
||||||
public event Action FloorLoaded;
|
public event Action FloorLoaded;
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ public partial class Map : Node3D, IMap
|
|||||||
|
|
||||||
public AutoProp<string> CurrentFloorDisplayString { get; private set; } = new AutoProp<string>(string.Empty);
|
public AutoProp<string> CurrentFloorDisplayString { get; private set; } = new AutoProp<string>(string.Empty);
|
||||||
|
|
||||||
|
public string NextFloorDisplayString => MapOrder.GetChildren().OfType<FloorNode>().ElementAt(CurrentFloorNumber.Value + 1).DisplayedFloorNumber;
|
||||||
|
|
||||||
private readonly string _floorFilePath = @"res://src/map/dungeon/floors/";
|
private readonly string _floorFilePath = @"res://src/map/dungeon/floors/";
|
||||||
|
|
||||||
public event Action<(Vector3 Rotation, Vector3 Position)> SpawnPointCreated;
|
public event Action<(Vector3 Rotation, Vector3 Position)> SpawnPointCreated;
|
||||||
|
|||||||
@@ -70,10 +70,12 @@ unique_name_in_owner = true
|
|||||||
|
|
||||||
[node name="Overworld" type="Node" parent="MapOrder"]
|
[node name="Overworld" type="Node" parent="MapOrder"]
|
||||||
script = ExtResource("3_v14r0")
|
script = ExtResource("3_v14r0")
|
||||||
|
DisplayedFloorNumber = "Surface"
|
||||||
|
|
||||||
[node name="Altar" type="Node" parent="MapOrder"]
|
[node name="Altar" type="Node" parent="MapOrder"]
|
||||||
script = ExtResource("3_v14r0")
|
script = ExtResource("3_v14r0")
|
||||||
FloorName = 1
|
FloorName = 1
|
||||||
|
DisplayedFloorNumber = "Altar"
|
||||||
|
|
||||||
[node name="Floor01" type="Node" parent="MapOrder"]
|
[node name="Floor01" type="Node" parent="MapOrder"]
|
||||||
script = ExtResource("2_00xd7")
|
script = ExtResource("2_00xd7")
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
|
|||||||
ExitButton.Pressed += ExitButton_Pressed;
|
ExitButton.Pressed += ExitButton_Pressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CurrentFloorNumber_Sync(int _) => FloorNumber.Text = (_map.CurrentFloorNumber.Value + 1).ToString("D2");
|
private void CurrentFloorNumber_Sync(int _) => FloorNumber.Text = _map.NextFloorDisplayString;
|
||||||
|
|
||||||
private void EquipmentComponent_EquipmentChanged(IEquipableItem obj)
|
private void EquipmentComponent_EquipmentChanged(IEquipableItem obj)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_tygw6"]
|
[sub_resource type="LabelSettings" id="LabelSettings_tygw6"]
|
||||||
font = ExtResource("5_6ox5a")
|
font = ExtResource("5_6ox5a")
|
||||||
font_size = 48
|
font_size = 40
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_xrfau"]
|
[sub_resource type="Animation" id="Animation_xrfau"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
@@ -291,9 +291,11 @@ horizontal_alignment = 2
|
|||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 4
|
||||||
|
|
||||||
[node name="LevelText" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
[node name="LevelText" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(300, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||||
theme_override_fonts/font = ExtResource("3_n7di7")
|
theme_override_fonts/font = ExtResource("3_n7di7")
|
||||||
|
|||||||
Reference in New Issue
Block a user