// Use this for initialization void Start() { // Set this object's rotation to be the same as the Main Camera transform.rotation = Camera.main.transform.rotation; GameObject gameManagerObject = GameObject.Find("Game Manager"); gameManager = gameManagerObject.GetComponent<GameManager>(); randomDialogue = gameManagerObject.GetComponent<RandomDialogue>(); if (GetComponent<TextMesh>() == null) { Debug.LogError("Must have a GameObject attached that has a TextMesh!"); } StartCoroutine("RollForShowBubble", timeBetweenRolls); }
// Use this for initialization void Start() { // Set this object's rotation to be the same as the Main Camera transform.rotation = Camera.main.transform.rotation; GameObject gameManagerObject = GameObject.Find("Game Manager"); gameManager = gameManagerObject.GetComponent <GameManager>(); randomDialogue = gameManagerObject.GetComponent <RandomDialogue>(); if (GetComponent <TextMesh>() == null) { Debug.LogError("Must have a GameObject attached that has a TextMesh!"); } StartCoroutine("RollForShowBubble", timeBetweenRolls); }