[Interactions] Pulver now swaps, slots and combines items
This commit is contained in:
@@ -127,6 +127,15 @@ public class Pickup : MonoBehaviour
|
||||
playerController.OnArrivedAtTarget += OnPlayerArrived;
|
||||
playerController.OnMoveToCancelled += OnPlayerMoveCancelled;
|
||||
Vector3 stopPoint = transform.position + (playerObj.transform.position - transform.position).normalized * playerStopDistance;
|
||||
playerController.MoveToAndNotify(stopPoint);
|
||||
float dist = Vector2.Distance(new Vector2(playerObj.transform.position.x, playerObj.transform.position.y), new Vector2(stopPoint.x, stopPoint.y));
|
||||
if (dist <= 0.2f)
|
||||
{
|
||||
// Already within stop range, trigger arrival logic immediately
|
||||
OnPlayerArrived();
|
||||
}
|
||||
else
|
||||
{
|
||||
playerController.MoveToAndNotify(stopPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user