Skip to content

Instantly share code, notes, and snippets.

@qqpann
Created June 17, 2021 16:22
Show Gist options
  • Save qqpann/a346a1ac107b171df57156a6d721934c to your computer and use it in GitHub Desktop.
Save qqpann/a346a1ac107b171df57156a6d721934c to your computer and use it in GitHub Desktop.
Useful for death zone etc.
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Player"))
{
FindObjectOfType<GameManager>().EndGame();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment