]> git.lizzy.rs Git - SuperMouseAdventure.git/blob - 2DGame/Assets/Scripts/BumperTrigger.cs
Herzen für die Bosse
[SuperMouseAdventure.git] / 2DGame / Assets / Scripts / BumperTrigger.cs
1 using System.Collections;
2 using System.Collections.Generic;
3 using UnityEngine;
4
5 public class BumperTrigger : MonoBehaviour
6 {
7     [SerializeField]
8     GameObject bumper;
9
10     // Start is called before the first frame update
11     void Start()
12     {
13         bumper.SetActive(false);
14     }
15
16     private void OnTriggerEnter2D(Collider2D other)
17     {
18         if(other.CompareTag("Player"))
19         {
20             bumper.SetActive(true);
21         }
22     }
23 }