Skip to content

Instantly share code, notes, and snippets.

@Templar2020
Created September 22, 2015 00:12
Show Gist options
  • Save Templar2020/98f3ec20363f7bd2ea37 to your computer and use it in GitHub Desktop.
Save Templar2020/98f3ec20363f7bd2ea37 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class DeathBox : MonoBehaviour {
void OnTriggerEnter2D (Collider2D other){
if(other.name == "Player")
{
Debug.Log("Player Enters Death Zone");
Destroy(other);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment