Added spring

This commit is contained in:
Pasha Bibko
2026-04-16 13:22:52 +01:00
parent 6868788af7
commit dd28471cfc
18 changed files with 650 additions and 37 deletions

View File

@@ -12,14 +12,14 @@ namespace Fruitomation.Game
private void Start()
{
TriggerDetector.SetAction((other) =>
TriggerDetector.SetAction(other =>
{
if (other.transform.parent.TryGetComponent(out Rigidbody2D body))
{
Vector3 force = new(-transform.localScale.x, 0f, 0f);
body?.AddForce(force * Mathf.PI, ForceMode2D.Impulse);
}
});
}, TriggerType.Stay);
}
private void Update()