// Use this for initialization void Awake() { scoreScript = GameObject.Find ("ScoreVal").GetComponent<ScoreTrackerScript> (); audioList = gameObject.transform.parent.parent.GetComponents<AudioSource> (); audioCount = audioList.Length; currentAudio = 0; // audio = gameObject.transform.parent.GetComponent<AudioSource> (); }
// Use this for initialization void Awake() { scoreScript = GameObject.Find("ScoreVal").GetComponent <ScoreTrackerScript> (); audioList = gameObject.transform.parent.parent.GetComponents <AudioSource> (); audioCount = audioList.Length; currentAudio = 0; // audio = gameObject.transform.parent.GetComponent<AudioSource> (); }
//public Vector3 screenPos; // Use this for initialization void Start() { player = GameObject.Find("Player"); currentHP = player.GetComponent <Health> ().currentHP; try{ scoreScript = GameObject.Find("ScoreVal").GetComponent <ScoreTrackerScript> (); }catch (Exception e) { Debug.Log("UIOverlay.cs: In the scene, is there a Score Prefab with a ScoreVal child?"); } }
//public Vector3 screenPos; // Use this for initialization void Start() { player = GameObject.Find ("Player"); currentHP = player.GetComponent<Health> ().currentHP; try{ scoreScript = GameObject.Find ("ScoreVal").GetComponent<ScoreTrackerScript> (); }catch(Exception e){ Debug.Log ("UIOverlay.cs: In the scene, is there a Score Prefab with a ScoreVal child?"); } }