// Use this for initialization void Start() { gs = GameObject.Find("Background"); gsscript = gs.GetComponent <BubbleGenerator2> (); //gsscript2 = gs.GetComponent<BubbleGenerator> (); water = GameObject.Find("WaterObject2"); //water2 = GameObject.Find ("WaterObject"); }
// Update is called once per frame void Start() { water1 = GameObject.Find("waterlevel"); fishswim2 = GameObject.Find("swim2"); fishswim1 = GameObject.Find("swim1"); gsscript2 = this.GetComponent <BubbleGenerator2> (); r = Random.Range(10, 30); //cat = GameObject.Find ("Cat"); if (backgroundMusic) { AudioSource.PlayClipAtPoint(backgroundMusic, transform.position); } }