using UnityEngine;
using System.Collections;

public class WolfAnimationController : MonoBehaviour 
{
	public Transform playerTransform;

	private Transform myTransform;
	private Animator anim;

	// Use this for initialization
	void Start () 
	{
		anim = GetComponent<Animator>();
		myTransform = transform;
	}
	
	// Update is called once per frame
	void Update () 
	{
		float distance = Vector3.Distance(playerTransform.position, myTransform.position);
		anim.SetFloat("playerDistance", distance);
	}
}
