Question by
julian950530 · May 06, 2017 at 04:50 PM ·
animationend
Animations
Hello to all, I have 2 animations, I want it when in an animation and when I press a key, I will not have to wait to finish the animation that was executed first to be able to move to the other animation
Comment
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class movimiento : $$anonymous$$onoBehaviour {
public Animator anim;
public float speed = 10.0f;
public float rotationSpeed = 100.0f;
void start() {
anim = GetComponent<Animator>();
}
void Update() {
cambiarAnimacionSegunEntradaUsuario ();
}
// Este metodo ejecuta las animaciones deacuerdo a que tecla se ejecuta
void cambiarAnimacionSegunEntradaUsuario() {
if (Input.Get$$anonymous$$ey ($$anonymous$$eyCode.S)) {
anim.SetTrigger ("quieto");
//anim.Rebind (); este metodo me reinicia la animacion
anim.
} else if (Input.Get$$anonymous$$ey ($$anonymous$$eyCode.W)) {
anim.SetTrigger("run");
}
}
}
Answer by theANMATOR2b · May 07, 2017 at 01:30 AM
check - or uncheck - has exit time on the transition.