Files
godot-host-test/Game/Turret/Turret.cs
T
2026-07-18 17:05:03 +02:00

17 lines
461 B
C#

using Godot;
using GodotHostTest.AetherBind;
using OwofGames.AetherBind;
namespace GodotHostTest.Game.Turret;
[Injected]
public partial class Turret : Sprite2D
{
[Export] private PackedScene _projectilePackedScene = null!;
[Inject] private ISceneInstantiator _sceneInstantiator = null!;
public override void _Ready()
{
GetTree().CreateTimer(1).Timeout += () => AddChild(_sceneInstantiator.Instantiate(_projectilePackedScene));
}
}