public virtual void OnMeshAnimatorFrame(MeshAnimator animator)
 {
                 #if SAGO_MESH_USE_SAGO_AUDIO
     AudioClip[] audioClips = null;
     if (animator.Animation != null && animator.Animation.Audio != null)
     {
         audioClips = animator.Animation.Audio.GetAudioClips(animator.CurrentIndex);
     }
     if (audioClips != null)
     {
         foreach (AudioClip audioClip in audioClips)
         {
             SagoAudio.AudioManager.Instance.Play(audioClip, this.transform);
         }
     }
                 #endif
 }
Пример #2
0
 public MeshSetElement(String key, MeshAnimator animator)
 {
     this.Animator = animator;
     this.Key      = key;
     this.Renderer = animator != null?animator.GetComponent <MeshRenderer>() : null;
 }
 public virtual void OnMeshAnimatorStop(MeshAnimator animator)
 {
 }
 public virtual void OnMeshAnimatorPlay(MeshAnimator animator)
 {
 }
Пример #5
0
        // ================================================================= //
        // Constructors
        // ================================================================= //

        public MeshAnimatorCropMediator(MeshAnimator animator)
        {
            this.Animator  = animator;
            this.Transform = animator.GetComponent <Transform>();
        }