Added a bit of sucking to pressers

This commit is contained in:
2026-04-22 00:37:55 +01:00
parent 5fd23e259c
commit 84d0e1d115
3 changed files with 13 additions and 6 deletions

View File

@@ -27,6 +27,15 @@ namespace Fruitomation.Game
EffectTrigger.SetAction(other => CurrentContainedObjects.Remove(other.gameObject),
TriggerType.Exit
);
EffectTrigger.SetAction(other =>
{
if (other.transform.parent.TryGetComponent(out Rigidbody2D body))
{
Debug.Log(body.name);
body.AddForce(Vector3.down * 5f, ForceMode2D.Force);
}
}, TriggerType.Stay);
}
private void Update()

View File

@@ -27,8 +27,6 @@ namespace Fruitomation.Game
if (hit.collider is null)
{
Vector3 force = new(-transform.localScale.x, 0f, 0f);
Debug.Log(mag);
body.AddForce(force * (12f / mag), ForceMode2D.Force);
}
}