Working Developer Settings

This commit is contained in:
2025-09-24 13:31:15 +02:00
parent 8b96a5d0c3
commit 783541a776
24 changed files with 965 additions and 754 deletions

View File

@@ -298,8 +298,9 @@ namespace Minigames.DivingForPictures
/// </summary>
private bool IsValidSpawnPosition(Vector3 position)
{
// Use OverlapCircle to check for collisions with tiles
Collider2D collision = Physics2D.OverlapCircle(position, _settings.EndlessDescenderObstacleSpawnCollisionRadius, _devSettings.ObstacleTileLayerMask);
// Use OverlapCircle to check for collisions with tiles using just the layer
// Convert the single layer to a layer mask inline (1 << layerNumber)
Collider2D collision = Physics2D.OverlapCircle(position, _settings.EndlessDescenderObstacleSpawnCollisionRadius, 1 << _devSettings.TrenchTileLayer);
return collision == null;
}