Example #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Checkpoint")
     {
         theCar.CheckpointHit(other.GetComponent <Checkpoint>().cpNumber);
     }
 }
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Checkpoint")
     {
         //Debug.Log("Hit cp " + other.GetComponent<Checkpoint>().cpNumber);
         theCar.CheckpointHit(other.GetComponent <Checkpoint>().cpNumber);
     }
 }
Example #3
0
    //Checkpoint checker when car enters checkpoint area

    private void OnTriggerEnter(Collider other)
    {
        // Need to make sure its an checkpoint area.
        if (other.tag == "Checkpoint")
        {
            // To check if it is hitting the checkpoint
            //Debug.Log("Hit cp " + other.GetComponent<Checkpoint>().cpNumber);

            theCar.CheckpointHit(other.GetComponent <Checkpoint>().cpNumber);
        }
    }