public override void Play(string animation) { if (animator.Name != animation) { animator.Play(animation); } }
// Update is called once per frame void Update() { if (animator == null) { animator = GetComponent<SpriterDotNetBehaviour>().Animator; animator.Play("an_climb"); //animator.Transition("an_fly", 2f); } animator.AnimationFinished += animationFinished; }
private void SwitchAnimation(int offset) { animator.Play(GetAnimation(animator, offset)); }