TO SQUASH: Fixed issues.
This commit is contained in:
@@ -6,6 +6,8 @@ public class CakeSpawner : Spawner
|
||||
|
||||
public SpriteRenderer gameBoardSpriteRenderer;
|
||||
|
||||
public WorldFiller worldFiller;
|
||||
|
||||
private Bounds cakeBounds;
|
||||
|
||||
private Bounds gameBoardBounds;
|
||||
@@ -66,15 +68,6 @@ public class CakeSpawner : Spawner
|
||||
{
|
||||
spawned = false;
|
||||
spawnTimer = 0f;
|
||||
spawnPosition = new Vector2(
|
||||
Random.Range(
|
||||
gameBoardBounds.min.x + cakeBounds.extents.x,
|
||||
gameBoardBounds.max.x - cakeBounds.extents.x
|
||||
),
|
||||
Random.Range(
|
||||
gameBoardBounds.min.y + cakeBounds.extents.y,
|
||||
gameBoardBounds.max.y - cakeBounds.extents.y
|
||||
)
|
||||
);
|
||||
spawnPosition = worldFiller.GetRandomPositionInFreeAreas(cakeBounds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user