/// <summary> /// Sets up all objects and variables that are needed to run the script. /// </summary> void Start() { loc = gameObject.GetComponent<ListObjectLocation>(); //ct = gameObject.GetComponent<CatchThrowV2s>(); AS = gameObject.GetComponent<AudioSource>(); AS.clip = roll; }
/// <summary> /// Initializes all of the objects and variables needed for this script. /// </summary> void Start () { GameObject GameController = GameObject.FindGameObjectWithTag("GameController"); REF = GameObject.FindGameObjectWithTag("Referee").GetComponent<Referee>(); BR = GameController.GetComponent<BallReset>(); GT = GameController.GetComponent<GameTimer>(); BT = GameObject.Find("BreakTimer").GetComponent<BreakTimer>(); ballPossession = ball.GetComponent<Possession>(); ballLocation = ball.GetComponent<ListObjectLocation>(); timer = gameObject.AddComponent<Timer>(); timer.SetLengthOfTimer(TimerFoulTime); timer.Resume(); DeadBallTimer = gameObject.AddComponent<Timer>(); DeadBallTimer.SetLengthOfTimer(DeadBallTime); DeadBallTimer.Pause(); }