private void HandleAnimationEvent(Transform originator, AnimationEvent message) { if ((message == AnimationEvent.DeathSequenceComplete) && (originator == _transform)) { // TODO: remove from play gracefully, update any states _transform.gameObject.SetActive(false); } }
private void HandleAnimationEvent(Transform originator, AnimationEvent message) { if (originator == Transform) { switch (message) { case AnimationEvent.AutoActionEffectOccurs: InvokeAutoActionEffect(); break; case AnimationEvent.AutoActionComplete: CompleteAutoAction(); break; } } }