using UnityEngine;
using System.Collections;

public class AnimatorManager : MonoBehaviour {

	private Animator anim;
	public string initialState;

	// Use this for initialization
	void Start () {
		anim = GetComponent<Animator>();

		if( initialState != null && initialState.Length > 0 ) {
			Play(initialState);
		}
	}

	public void Play(string name) {
		// make actor not player (prevent moving)
		Actor a = GetComponent<Actor>();
		a.kind = Actor.Kind.NotPlayer;
		anim.enabled = true;
		anim.Play(name);
	}
}
