Trick is now pickup-able and is not scored by baskets

This commit is contained in:
hz
2026-01-31 18:55:26 -06:00
parent c24846d568
commit 7d1b387d19
6 changed files with 86 additions and 6 deletions
+9
View File
@@ -92,6 +92,11 @@ public class PlayerPickupController : MonoBehaviour
rb.mass = 0;
}
if (heldObject.TryGetComponent<TrickController>(out var trick))
{
trick.SetCarried(true);
}
if (col != null) col.enabled = false;
break;
}
@@ -106,6 +111,10 @@ public class PlayerPickupController : MonoBehaviour
rb.bodyType = RigidbodyType2D.Dynamic;
rb.gravityScale = 1;
}
if (heldObject.TryGetComponent<TrickController>(out var trick))
{
trick.SetCarried(false);
}
Collider2D col = heldObject.GetComponent<Collider2D>();
if (col != null) col.enabled = true;