feat: hooking observability.

This commit is contained in:
redglow
2026-07-25 22:26:07 +02:00
parent bc7297c6bc
commit dad5027e0e
9 changed files with 93 additions and 1 deletions
+4
View File
@@ -1,5 +1,6 @@
using Godot;
using GodotHostTest.AetherBind;
using Microsoft.Extensions.Logging;
using OwofGames.AetherBind;
namespace GodotHostTest.Game.Turret;
@@ -7,10 +8,12 @@ namespace GodotHostTest.Game.Turret;
public partial class Turret : Sprite2D
{
[Export] private Node2D _launcher = null!;
[Inject] private ILogger<Turret> _logger = null!;
[Export] private PackedScene _projectilePackedScene = null!;
private double _rotationDirection;
[Export] private double _rotationSpeed = 6;
[Inject] private ISceneInstantiator _sceneInstantiator = null!;
private void OnTimerTimeout()
@@ -18,6 +21,7 @@ public partial class Turret : Sprite2D
var projectile = _sceneInstantiator.Instantiate<Node2D>(_projectilePackedScene);
projectile.Rotation = _launcher.Rotation;
AddChild(projectile);
_logger.LogInformation("Projectile launched.");
}
public override void _Input(InputEvent @event)