This script will list the last collider that an object collided with. This is used to tell the location of an object as it enters a new trigger area.
Inheritance: MonoBehaviour
Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
    /// <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();
	}