private void OnActorUpdate(ActorUpdateEvent evt) { seconds -= Time.deltaTime; if (seconds <= 0.0f) { Destroy(actor.gameObject); } }
private void OnActorUpdate(ActorUpdateEvent evt) { elapsed += Time.deltaTime; if (elapsed < value) { return; } target.SetActive(false); // If we are still active after the call to setactive then // we need to stop the actor update. if (isActiveAndEnabled) { UnregisterHandler <ActorUpdateEvent>(); } }