token manager for projectile

This commit is contained in:
2026-05-16 01:29:02 +02:00
parent afa335e7bf
commit 4cd67023d9
7 changed files with 83 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ using Gamesmiths.Forge.Godot.Resources.Abilities;
using Gamesmiths.Forge.Statescript;
using Gamesmiths.Forge.Tags;
using Movementtests.interfaces;
using Movementtests.managers;
using Movementtests.tools;
using Node = Godot.Node;
@@ -73,6 +74,7 @@ public partial class Projectile : RigidBody3D, IForgeEntity, ITargetable, IKilla
public Node3D? Target { get; set; }
public Vector3? ImpulseDirection { get; set; }
public TokenManager.Token? Token { get; set; }
public void Init()
{
@@ -148,6 +150,7 @@ public partial class Projectile : RigidBody3D, IForgeEntity, ITargetable, IKilla
public void Kill()
{
Token?.OnUse.Invoke();
QueueFree(); // If thrown offmap
}
}