Need urgent help!

I’m playing with unity for 2 weeks because my teacher asked me to do a game with it, but in order to animate the hero I need to improve my playercontroller. So far it’s like this:

using UnityEngine;
using System.Collections;
public class HeroControl : MonoBehaviour {
*public float speed = 8f; *

  • void Update ()*
  • {*
  • if (Input.GetKey (KeyCode.RightArrow))*
    _ transform.position += new Vector3 (speed * Time.deltaTime, 0.0f);_
  • if (Input.GetKey (KeyCode.LeftArrow))*
    _ transform.position -= new Vector3 (speed * Time.deltaTime, 0.0f);_
  • if (Input.GetKey (KeyCode.UpArrow))*
    _ transform.position += new Vector3 (0.0f, speed * Time.deltaTime);_
  • if (Input.GetKey (KeyCode.DownArrow))*
    _ transform.position -= new Vector3 (0.0f, speed * Time.deltaTime);_
  • }*
    }

If someone could tell me what to do to put the animation like those old RPG, that would be great.
That’s the image i’m trying to animate /
1447723--78110--$131-Noble06.png
Thx for your help, sorry for the bad english :smile:

Here is some sample code: Forum link Animated GIFS