Fix minion drain null

This commit is contained in:
Pedro Gomes 2024-12-29 20:20:11 +00:00
parent b29b17ebfd
commit b9a5c1e73d

View File

@ -86,6 +86,13 @@ public class NetworkedDrainProjectile : MonoBehaviour
if (waitingForDestroy) return;
if(owner == null)
{
waitingForDestroy = true;
StartCoroutine(DelayedDestroy());
return;
}
currentspeed += Time.deltaTime*2f;
this.transform.position = Vector3.Lerp(this.transform.position, owner.transform.position, currentspeed * Time.deltaTime);
}