feat: hooking observability.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user