using UnityEngine;
using System.Collections;

[AddComponentMenu("Scripts/Framework/Animation Test")]
public class AnimationTest : MonoBehaviour 
{
    Animator animator;

	// Use this for initialization
	void Start () 
    {
        this.animator = GetComponent<Animator>();
	}
	
	// Update is called once per frame
	void Update () 
    {
        float moveSpeed = Input.GetAxis("Vertical") * 2;
        if (Input.GetKey(KeyCode.LeftShift))
            moveSpeed = moveSpeed * 3;
        GetComponent<CharacterController>().Move(new Vector3(0, 0, moveSpeed * Time.deltaTime));
        this.animator.SetFloat("Speed", moveSpeed);
	}
}
