Last active
August 7, 2019 12:54
-
-
Save vjgrayman/0dae86b7f69bc95d4c1cc25ee0a4f931 to your computer and use it in GitHub Desktop.
[OnTriggerEnter] #CSharp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: syntax=CSharp | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Collectible : MonoBehaviour | |
{ | |
// add points | |
// add powerup ability... | |
private void OnTriggerEnter(Collider other) | |
{ | |
if (other.tag == "Player") | |
{ | |
Destroy(this.gameObject); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment