void Start() { GM = GameObject.Find("GameManager(Clone)"); //Get the game manager gameManager = GM.GetComponent <GameManager>(); // Get game manager script from gameobject playerAnim = Player.GetComponent <Animator>(); // Animator for Player dogAnim = Dog.GetComponent <Animator>(); // Animator for Dog playerScript = Player.GetComponent <Player_Underworld>(); optionsList = new Text[4]; optionsList[0] = petDog; optionsList[1] = giveTreat; optionsList[2] = throwToy; optionsList[3] = backOff; selectedOption = 0; norPetDog = petDog.text; norGiveTreat = giveTreat.text; norThrowToy = throwToy.text; norBackOff = backOff.text; stringList = new string[4]; stringList[0] = norPetDog; stringList[1] = norGiveTreat; stringList[2] = norThrowToy; stringList[3] = norBackOff; petDog.text = "> " + petDog.text; }
// Use this for initialization void Start() { Player = transform.parent.gameObject; playerScript = Player.GetComponent <Player_Underworld>(); }