Since they original code is not posted on this site, I am not going to click on the link. Instead, I will give you a very simple 3rd person controller script that illustrates how movement can be handled on a basic level. And to be honest, animations are much better handled using the Animation Controller Component. It uses a state machine to control the animations and you can add int parameters. In addition to the simple movement in 3rd person view, I will also comment on how you could take advantage of the Animation Controller in scripting.
using UnityEngine;
using System.Collections;
public class ThirdPersonCamera : MonoBehaviour
{
public Camera cam;
public GameObject character;
public Animator anim; // Gets the Animator component and
// is better used when it is attached to the character
void followCharacter()
{
if (Input.GetKey(KeyCode.LeftArrow))
{
cam.transform.position -= new Vector3(1, 0, 0);
//anim.SetInt(1); if the parameter is an integer
// it will move to that specific animation
}
else if (Input.GetKey(KeyCode.RightArrow))
{
cam.transform.position += new Vector3(1, 0, 0);
}
else if (Input.GetKey(KeyCode.UpArrow))
{
cam.transform.position += new Vector3(0, 0, 1);
}
else if (Input.GetKey(KeyCode.DownArrow))
{
cam.transform.position -= new Vector3(0, 0, 1);
}
}
void Update()
{
followCharacter();
}
}