Global Game Jam 2023
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
372 B

1 year ago
1 year ago
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class TileController : MonoBehaviour
  5. {
  6. public Transform entryAnchor;
  7. public Transform exitAnchor;
  8. private void OnTriggerExit(Collider other)
  9. {
  10. if(other.transform.Equals(Camera.main.transform))
  11. {
  12. Destroy(gameObject, 1f);
  13. }
  14. }
  15. }