// 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> ();
 }
Exemple #2
0
 // 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> ();
 }
Exemple #3
0
    //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?");
        }
    }
Exemple #4
0
 //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?");
     }
 }