// Use this for initialization void Start() { anim = GetComponent <Animator>(); source = GetComponent <AudioSource>(); gm = GameObject.FindGameObjectWithTag("GameManager").GetComponent <pgGameManager>(); ui = GameObject.FindGameObjectWithTag("GameManager").GetComponentInChildren <pgUIManager>(); cm = GameObject.FindGameObjectWithTag("GameManager").GetComponentInChildren <pgCollectibleManager>(); }
// Use this for initialization void Start() { gm = GetComponentInParent <pgGameManager>(); messageText.text = "Grab the flashlight!"; }