// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { //DetectorDeChao = animator.transform.GetChild(0); tempo = Random.Range(TempoMin, TempoMax); asset = animator.gameObject.GetComponent <InimigoStatus>().asset; //TemChao = animator.GetBool("TemChao"); //AndarParaDireita = animator.GetBool("AndandoParaDireita"); }
private void Awake() { asset = gameObject.GetComponentInParent <InimigoStatus>().asset; Dano = asset.Dano; }