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 ((message == AnimationEvent.DeathSequenceComplete) && (originator == _transform))
     {
         // TODO: remove from play gracefully, update any states
         _transform.gameObject.SetActive(false);
     }
 }
Beispiel #3
0
        private void HandleAnimationEvent(Transform originator, AnimationEvent message)
        {
            if (originator == Transform)
            {
                switch (message)
                {
                case AnimationEvent.AutoActionEffectOccurs: InvokeAutoActionEffect(); break;

                case AnimationEvent.AutoActionComplete: CompleteAutoAction(); break;
                }
            }
        }
 private void HandleAnimationEvent(Transform originator, AnimationEvent message)
 {
     if (originator == Transform)
     {
         switch (message)
         {
             case AnimationEvent.AutoActionEffectOccurs: InvokeAutoActionEffect(); break;
             case AnimationEvent.AutoActionComplete: CompleteAutoAction(); break;
         }
     }
 }