// Use this for initialization void Start() { this.timeBeforeNextSpawn = this.delaySpawn; gameMode = ((GameObject)GameObject.FindGameObjectWithTag("gamemode")).GetComponent<SorterGamemode>(); sorterColors = gameMode.GetComponent<SorterColors>(); }
// Use this for initialization void Start() { gameMode = ((GameObject)GameObject.FindGameObjectWithTag("gamemode")).GetComponent<SorterGamemode>(); sorterColors = gameMode.GetComponent<SorterColors>(); this.GetComponent<Renderer>().material = sorterColors.getMaterial(color); coin = GameObject.Find("Coin").GetComponent<AudioSource>(); }
// Use this for initialization void Start() { gameMode = ((GameObject)GameObject.FindGameObjectWithTag("gamemode")).GetComponent<SorterGamemode>(); if (gameMode == null) Debug.Log("SorterBall : couldn't find gamemode"); this.gameObject.name = "SorterBall"; buzzer = GameObject.Find("Buzzer").GetComponent<AudioSource>(); }