TO SQUASH: Cake fix.
This commit is contained in:
@@ -22,6 +22,8 @@ public class YummyCake : MonoBehaviour
|
|||||||
|
|
||||||
private Animator animator;
|
private Animator animator;
|
||||||
|
|
||||||
|
private WorldFiller worldFiller;
|
||||||
|
|
||||||
private static float laserProbability = 0.4f;
|
private static float laserProbability = 0.4f;
|
||||||
|
|
||||||
private static float magnetProbability = 0.2f;
|
private static float magnetProbability = 0.2f;
|
||||||
@@ -39,12 +41,14 @@ public class YummyCake : MonoBehaviour
|
|||||||
animator = GetComponent<Animator>();
|
animator = GetComponent<Animator>();
|
||||||
|
|
||||||
audioSource.PlayOneShot(spawnSound);
|
audioSource.PlayOneShot(spawnSound);
|
||||||
|
|
||||||
|
worldFiller = GameObject.FindWithTag("WorldFiller")?.GetComponent<WorldFiller>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BreakOrMiss()
|
public void BreakOrMiss()
|
||||||
{
|
{
|
||||||
// TODO: Implement logic to check if the cake is in a clear area or not
|
// TODO: Implement logic to check if the cake is in a clear area or not
|
||||||
bool inClearArea = true;
|
bool inClearArea = worldFiller.IsPositionInFreeArea(transform.position);
|
||||||
|
|
||||||
if (inClearArea)
|
if (inClearArea)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user