aboutsummaryrefslogtreecommitdiffstats
path: root/Assets/Scripts/BoobyTrap.cs
blob: 72fc6cea88446c51a1828ee0fa0b9f1d1a7f8d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
        }
    }
}