Boss fixes, various changes

This commit is contained in:
2026-01-25 19:01:34 -08:00
parent 2622ed4423
commit 865934399d
25 changed files with 5770 additions and 371 deletions

View File

@@ -1,6 +1,7 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
[Meta(typeof(IAutoNode))]
@@ -10,15 +11,28 @@ public partial class Minimap : Control
[Dependency] public IMap _map => this.DependOn<IMap>();
[Dependency] public IPlayer _player => this.DependOn<IPlayer>();
[Node] public Camera3D MinimapCamera { get; set; }
[Node] public Label LayerNumberText { get; set; } = default!;
private bool _ready = false;
public void OnResolved()
{
_map.CurrentFloorNumber.Sync += CurrentFloorNumber_Sync;
_map.CurrentFloorNumber.Sync += CurrentFloorNumber_Sync;
_ready = true;
}
public override void _PhysicsProcess(double delta)
{
if (_ready)
MinimapCamera.Position = new Vector3(_player.GlobalPosition.X, MinimapCamera.Position.Y, _player.GlobalPosition.Z);
}
private void CurrentFloorNumber_Sync(int obj)
{
LayerNumberText.Text = $"{obj:D2}";
LayerNumberText.Text = $"{obj:D2}";
}
}

View File

@@ -63,8 +63,9 @@ handle_input_locally = false
size = Vector2i(350, 300)
render_target_update_mode = 4
[node name="Minimap Camera" type="Camera3D" parent="CenterContainer/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -21.7374, 240.05, 2.76249)
[node name="MinimapCamera" type="Camera3D" parent="CenterContainer/SubViewportContainer/SubViewport"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -21.7374, 146.05, 2.76249)
cull_mask = 2
environment = SubResource("Environment_yn75n")
attributes = SubResource("CameraAttributesPractical_yn75n")