// Use this for initialization void Start() { ballSFX = GetComponent <AudioSource> (); rb = GetComponent <Rigidbody2D> (); mainLight = GameObject.FindGameObjectWithTag("mainLight").GetComponent <MainLightController> (); scoreTextController = GameObject.FindGameObjectWithTag("scoreText").GetComponent <TextController> (); mainLight.RaiseLights(); scoreTextController.LowerAlpha(); Invoke("LaunchBall", 4f); }
void Start() { ball = GameObject.FindGameObjectWithTag("ball").GetComponent <BallController>(); mainLight = GameObject.FindGameObjectWithTag("mainLight").GetComponent <MainLightController> (); scoreTextController = GameObject.FindGameObjectWithTag("scoreText").GetComponent <TextController> (); }