Link CAN hit
This commit is contained in:
22
Scripts/Projectile.cs
Normal file
22
Scripts/Projectile.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Projectile : Node3D
|
||||
{
|
||||
[Export]
|
||||
public double Cooldown { get; protected set; }
|
||||
|
||||
[Export]
|
||||
private float _projectileSpeed = 100f;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Speed = _projectileSpeed;
|
||||
}
|
||||
|
||||
public float Speed { get; private set; }
|
||||
|
||||
public void OnTimeToLiveTimeout()
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user