Fixing small bugs.

This commit is contained in:
Khauvinkh
2024-08-18 19:27:27 +02:00
parent 9b4726113a
commit 3036732a0d
6 changed files with 2005 additions and 78 deletions

View File

@@ -52,8 +52,13 @@ public class CranePickDrop : MonoBehaviour
if (state == State.Catching)
{
Debug.Assert(handlingBody, this);
Debug.Assert(magnet, this);
if (handlingBody == null)
{
state = State.Idle;
return;
}
magnet.strength = magnetStrength;
if (magnet.IsCloseTo(handlingBody, 2f))