public virtual void Spawn(Vector3 position, Quaternion rotation, System.Action onExpired = null) { isDead = false; diedAt = -1; health.SetPercent(1); selfTargetRoot.position = position; selfTargetRoot.rotation = rotation; StartCoroutine(UnityHelpers.CommonRoutines.WaitToDoAction(success => { ArrowController.DestroyArrowsInObject(transform); onExpired?.Invoke(); }, 0, () => { return(IsDead() && Time.time - diedAt >= behaviour.deathTime); })); }
public void Revive() { ArrowController.DestroyArrowsInObject(transform); isDead = false; birdBody.isKinematic = true; }