Example #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         Debug.Log("New checkpoint set");
         checkpointController.SetCheckpoint(this.gameObject);
     }
 }
Example #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player" && !done)
     {
         done = true;
         poleRenderer.enabled = false;
         CheckpointController.SetCheckpoint();
     }
 }
 private void SetCheckPoint()
 {
     CheckpointController.SetCheckpoint(spawner.ID);
 }