public override void Update() { actualLifetime--; if (actualLifetime <= 0) { if (BecameUnusable != null) { SetActive(false); BecameUnusable.Raise(this); } } Transform.Position += direction * Time.DeltaTime; }
public override void OnDestroy() { BecameUnusable.RemoveAllListeners(); base.OnDestroy(); }