Skip to content

Common.Animancer

DucNV_2000 edited this page Jul 10, 2024 · 1 revision

Common.Animancer

  • PlayAnim
AnimancerComponent PlayClip(this AnimancerComponent animancerComponent, ClipTransition clip,
            Action _endAnim = null, float _durationFade = .2f, bool isCheckPlayingClip = true,
            FadeMode mode = default)
  • PauseClip
// Freeze a single animation on its current frame:
AnimancerComponent PauseClip(this AnimancerComponent animancerComponent, ClipTransition clip)
  • PauseAll
// Freeze all animations on their current frame
AnimancerComponent PauseAll(this AnimancerComponent animancerComponent)
  • StopClip
// Stop a single animation from affecting the character and rewind it to the start
AnimancerComponent StopClip(this AnimancerComponent animancerComponent, ClipTransition clip)
  • StopAll
// Stop all animations from affecting the character and rewind them to the start
AnimancerComponent StopAll(this AnimancerComponent animancerComponent)

Example

   public AnimancerComponent animancerComponent;
   public ClipTransition clip;

   public void PlayAnimation()
   {
       animancerComponent.PlayAnim(clip);
   }
   public void PauseAnimation()
   {
       animancerComponent.PauseClip(clip);
   }

   public void PauseAllAnimation()
   {
       animancerComponent.PauseAll();
   }

   public void StopAnimation()
   {
       animancerComponent.StopClip(clip);
   }

   public void StopAllAnimation()
   {
       animancerComponent.StopAll();
   }
Clone this wiki locally