diff options
author | Neil Kollack <nkollack@gmail.com> | 2022-04-14 21:14:44 -0500 |
---|---|---|
committer | Neil Kollack <nkollack@gmail.com> | 2022-04-14 21:14:44 -0500 |
commit | 80c478b00f090a64ccd63d3252ac02ffa1f7f5a2 (patch) | |
tree | ec0aefd7727a8ae29be0ebac1f2e005283fe1782 /Assets/Scripts/BoobyTrap.cs | |
parent | 15a62795a2f2d9e7311bea4b59430c589125ec79 (diff) |
feat: level complete
Diffstat (limited to 'Assets/Scripts/BoobyTrap.cs')
-rw-r--r-- | Assets/Scripts/BoobyTrap.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Assets/Scripts/BoobyTrap.cs b/Assets/Scripts/BoobyTrap.cs new file mode 100644 index 0000000..72fc6ce --- /dev/null +++ b/Assets/Scripts/BoobyTrap.cs @@ -0,0 +1,16 @@ +using MontanaJohns.Actors; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class BoobyTrap : MonoBehaviour +{ + private void OnTriggerEnter2D(Collider2D collision) + { + if (collision.gameObject.tag == "Player") + { + gameObject.GetComponent<SpriteRenderer>().sprite = null; + //TODO spawn the boulder + } + } +} |