]> git.cameronkatri.com Git - gmtk-gamejam.git/blob - Assets/Scripts/Controllers/Hoop.cs
Resolve conflicts
[gmtk-gamejam.git] / Assets / Scripts / Controllers / Hoop.cs
1 using System;
2 using UnityEngine;
3
4 namespace Controllers
5 {
6 public class Hoop : MonoBehaviour
7 {
8 [SerializeField] private BoxCollider2D Rim;
9 [SerializeField] private BoxCollider2D Net;
10
11 private void OnTriggerEnter2D(Collider2D other)
12 {
13 if (other.GetComponent<Ball>() == null) return;
14
15 if (Rim.IsTouching(other) && Net.IsTouching(other))
16 Debug.Log("Swish!");
17 }
18 }
19 }