using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AnimationManager : MonoBehaviour {
Animator anim;
void Start () {
anim = GetComponent<Animator> ();
}
void Update () {
var estaMovendo = Input.GetAxis ("Vertical");
if (estaMovendo != 0) {
anim.SetBool ("estaAndando", true);
anim.SetBool ("estaParado", false);
} else {
anim.SetBool ("estaAndando", false);
anim.SetBool ("estaParado", true);
}
if (Input.GetButtonDown ("Fire1")) {
anim.SetBool ("estaAtacando", true);
anim.SetBool ("estaParado", false);
} else {
anim.SetBool ("estaAtacando", false);
}
}
}