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