using UnityEngine;
using System.Collections;

public class RegisterPlayer : MonoBehaviour {

	void Start ()
    {
        //if (GameController.CurrentDepth == 1)
        //    return;

        GameObject pgo = GameObject.Find("Player(Clone)");
        if(pgo == null)
        {
            Debug.LogError("RegisterPlayer cannot find player gameobject named Player(Clone)");
            return;
        }

        TurnActor player = pgo.GetComponent<TurnActor>();
        if (player == null)
        {
            Debug.LogError("RegisterPlayer cannot find TurnActor on player " + pgo.name);
            return;
        }

        Debug.Log("RegisterPlayer TurnActor for " + player.name);
        TurnBasedGameLoop.instance.AddActorToGame(player);
    }
}
