<pre>using UnityEngine; using System.Collections; public class Movimento : MonoBehaviour { public Animator Animacao; // Use this for initialization void Start () { } // Update is called once per frame void Update () { Animacao = gameObject.GetComponent<Animator> (); if (Input.GetAxisRaw ("A") == 1) { Animacao.SetBool ("Andar(a)", true); gameObject.transform.Translate(new Vector2(-0.1, 0f)); } if (Input.GetAxisRaw ("A") == 0) { Animacao.SetBool ("Andar(a)", false); } } }
I searched for videos on youtube and searched on google but none helped me, I also tried to change the code but it was not
gameObject.transform.Translate(new Vector2(-0.1, 0.0f));
gameObject.transform.Translate(new Vector2(-0.1f, 0.0f));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)