public void AEEndOfDeathAnim() { timeUtils.TimeDelay(0.25f, () => { blink.BlinkPlease(() => { gameObject.SetActive(false); }); }); }
private void Desactivate() { physic.enabled = false; if (blinkAtTheEnd && !blinking) { blinking = true; blink.BlinkPlease(() => { gameObject.SetActive(false); }); } else if (!blinkAtTheEnd) { gameObject.SetActive(false); } }
override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (blink == null) { blink = animator.GetComponent <Blink>(); } if (stateInfo.normalizedTime > stateInfo.length && !blinking) { blinking = true; blink.BlinkPlease(() => { Transform t = animator.transform; while (t.parent != null && t.parent.tag == "enemy") { t = t.parent; } t.gameObject.SetActive(false); }); } }
public void DeathAnimCB() { blink.BlinkPlease(NotifyDeath); }