Example #1
0
    void Awake()
    {
        target = GameObject.Find("Player").GetComponent <Act1Scene1Quest>();
        if (this.gameObject.activeSelf == false)
        {
//			Debug.Log("Pakyu");
        }
        else if (this.gameObject.activeSelf == true)
        {
//			Debug.Log("YEAH!");
            target.audio.PlayOneShot(target.clip[1]);
        }
    }
Example #2
0
    void Awake()
    {
        act1Check = GameObject.Find("Player").GetComponent <Act1Scene1Quest>();
        //checks if the tagged qindicator are in scene
        var aObjects = GameObject.FindGameObjectsWithTag("qIndicator");
        //redefine the list to array
        var qObject = new GameObject[aObjects.Length];

        //save the qobjects into the array for easy access when deactivated
        for (int i = 0; i < aObjects.Length; i++)
        {
            qObject[i] = aObjects[i];
//		Debug.Log("object ="+qObject[i].name+"'s current state in this scene is"+
//	          qObject[i].activeInHierarchy+"and object is"+qObject[i]);
        }
    }
Example #3
0
	void Awake(){
		target = GameObject.Find ("Chest 1").GetComponent<SpriteRenderer>();
		newSprite =  GameObject.Find ("Chest 2").GetComponent<SpriteRenderer>();
		act1Check = GameObject.Find ("Player").GetComponent<Act1Scene1Quest>();

	}