Made fans OP for playtest

This commit is contained in:
Pasha Bibko
2026-04-28 16:54:25 +01:00
parent 9990e7f8cf
commit 79b04955af
5 changed files with 50 additions and 10 deletions

View File

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

View File

@@ -17,6 +17,9 @@ namespace Fruitomation.Game
[Header("References")]
[SerializeField] private Transform FruitSpawnParent;
[SerializeField] private Canvas GameCanvas;
[SerializeField] private RectTransform GameBounds;
public static RectTransform Bounds => Instance.GameBounds;
[Header("Prefabs")]
[SerializeField] private GameObject BaseItemPrefab;

View File

@@ -112,7 +112,7 @@ namespace Fruitomation.Game.Items
private void FixedUpdate()
{
if (IsNotWithinCanvas(RectTransform, AttachedCanvas.GetComponent<RectTransform>()))
if (IsNotWithinCanvas(RectTransform, FruitSpawner.Bounds))
{
TriggerDestruction();
}
@@ -145,8 +145,8 @@ namespace Fruitomation.Game.Items
}
return
!(bMin > (aMin - 1f)) ||
!(bMax < (aMax + 1f));
!(bMin > (aMin)) ||
!(bMax < (aMax));
}
public void TriggerDestruction(bool harvest = true)