Added a bit of sucking to pressers
This commit is contained in:
@@ -71,7 +71,7 @@ BoxCollider2D:
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Offset: {x: 0, y: 3}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
@@ -81,7 +81,7 @@ BoxCollider2D:
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 150, y: 110}
|
||||
m_Size: {x: 150, y: 105}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &8140780552350643576
|
||||
MonoBehaviour:
|
||||
@@ -508,7 +508,7 @@ BoxCollider2D:
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: -52}
|
||||
m_Offset: {x: 0, y: -47}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
@@ -518,7 +518,7 @@ BoxCollider2D:
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 88, y: 16}
|
||||
m_Size: {x: 88, y: 6}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &8718160904021803034
|
||||
GameObject:
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user