aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Assets/Scripts/Controllers/Hoop.cs
diff options
context:
space:
mode:
authorCarson Katri <carson.katri@gmail.com>2021-06-12 16:57:05 -0400
committerCarson Katri <carson.katri@gmail.com>2021-06-12 16:57:05 -0400
commit2da4072647dbf8577f8a5e2391551fbbfceef231 (patch)
tree636de5585864d64832d362117d40c93de97e5bb9 /Assets/Scripts/Controllers/Hoop.cs
parent939170f625e5928d5ca86a57796aaa23f25a4fa7 (diff)
parentd6d5014337ab72a6eb8c2f93fae107c71d267649 (diff)
downloadgmtk-gamejam-2da4072647dbf8577f8a5e2391551fbbfceef231.tar.gz
gmtk-gamejam-2da4072647dbf8577f8a5e2391551fbbfceef231.tar.zst
gmtk-gamejam-2da4072647dbf8577f8a5e2391551fbbfceef231.zip
Resolve conflicts
Diffstat (limited to 'Assets/Scripts/Controllers/Hoop.cs')
-rw-r--r--Assets/Scripts/Controllers/Hoop.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Assets/Scripts/Controllers/Hoop.cs b/Assets/Scripts/Controllers/Hoop.cs
new file mode 100644
index 0000000..58f7130
--- /dev/null
+++ b/Assets/Scripts/Controllers/Hoop.cs
@@ -0,0 +1,19 @@
+using System;
+using UnityEngine;
+
+namespace Controllers
+{
+ public class Hoop : MonoBehaviour
+ {
+ [SerializeField] private BoxCollider2D Rim;
+ [SerializeField] private BoxCollider2D Net;
+
+ private void OnTriggerEnter2D(Collider2D other)
+ {
+ if (other.GetComponent<Ball>() == null) return;
+
+ if (Rim.IsTouching(other) && Net.IsTouching(other))
+ Debug.Log("Swish!");
+ }
+ }
+} \ No newline at end of file