Added spring
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user