Merge pull request 'Adding trick spawn and movement to Experiment scene' (#25) from get-tricky into main
Reviewed-on: admin/GGJ2026#25 Reviewed-by: Ramdar <[email protected]>
This commit is contained in:
@@ -100,6 +100,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;
|
||||
}
|
||||
@@ -114,6 +119,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user