Cleanup compile warnings, cleanup logs, spruce up level selection menu
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using AppleHills.Core.Settings;
|
||||
using System.Collections;
|
||||
using AppleHills.Core.Interfaces;
|
||||
using AppleHills.Core.Settings;
|
||||
using Core;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
namespace Minigames.DivingForPictures.Bubbles
|
||||
{
|
||||
/// <summary>
|
||||
/// Spawns bubbles at intervals, randomizing their properties and assigning a random sprite to each.
|
||||
@@ -45,9 +44,9 @@ namespace Minigames.DivingForPictures
|
||||
if (_devSettings.BubbleUseObjectPooling)
|
||||
{
|
||||
// Create the bubble pool
|
||||
GameObject poolGO = new GameObject("BubblePool");
|
||||
poolGO.transform.SetParent(transform);
|
||||
_bubblePool = poolGO.AddComponent<BubblePool>();
|
||||
GameObject poolGo = new GameObject("BubblePool");
|
||||
poolGo.transform.SetParent(transform);
|
||||
_bubblePool = poolGo.AddComponent<BubblePool>();
|
||||
_bubblePool.initialPoolSize = _devSettings.BubbleInitialPoolSize;
|
||||
_bubblePool.maxPoolSize = _devSettings.BubbleMaxPoolSize;
|
||||
_bubblePool.Initialize(bubblePrefab);
|
||||
@@ -89,7 +88,7 @@ namespace Minigames.DivingForPictures
|
||||
}
|
||||
|
||||
// Pause all active bubbles
|
||||
Bubble[] activeBubbles = FindObjectsOfType<Bubble>();
|
||||
Bubble[] activeBubbles = FindObjectsByType<Bubble>(FindObjectsSortMode.None);
|
||||
foreach (var bubble in activeBubbles)
|
||||
{
|
||||
if (bubble != null)
|
||||
@@ -110,7 +109,7 @@ namespace Minigames.DivingForPictures
|
||||
StartSpawningCoroutine();
|
||||
|
||||
// Resume all active bubbles
|
||||
Bubble[] activeBubbles = FindObjectsOfType<Bubble>();
|
||||
Bubble[] activeBubbles = FindObjectsByType<Bubble>(FindObjectsSortMode.None);
|
||||
foreach (var bubble in activeBubbles)
|
||||
{
|
||||
if (bubble != null)
|
||||
|
||||
@@ -8,6 +8,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Bootstrap;
|
||||
using Minigames.DivingForPictures.Bubbles;
|
||||
using UI;
|
||||
using UI.Core;
|
||||
using UnityEngine;
|
||||
@@ -97,7 +98,6 @@ namespace Minigames.DivingForPictures
|
||||
public event Action<Monster, float> OnPhotoSequenceCompleted; // Now includes proximity score
|
||||
|
||||
private static DivingGameManager _instance = null;
|
||||
private static bool _isQuitting = false;
|
||||
|
||||
public AudioSource deathAudioPlayer;
|
||||
public CameraViewfinderManager cameraViewfinderManager;
|
||||
@@ -122,11 +122,6 @@ namespace Minigames.DivingForPictures
|
||||
_isGameOver = false;
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Register for post-boot initialization
|
||||
|
||||
@@ -15,13 +15,11 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
{
|
||||
// Singleton instance
|
||||
private static CameraViewfinderManager _instance;
|
||||
private static bool _isQuitting = false;
|
||||
|
||||
public static CameraViewfinderManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
if (_instance == null && Application.isPlaying)
|
||||
{
|
||||
_instance = FindAnyObjectByType<CameraViewfinderManager>();
|
||||
if (_instance == null)
|
||||
@@ -89,11 +87,6 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
settings = GameManager.GetSettingsObject<IDivingMinigameSettings>();
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace Minigames.DivingForPictures
|
||||
/// </summary>
|
||||
public class TileBumpCollision : PlayerCollisionBehavior
|
||||
{
|
||||
private bool _isBumping;
|
||||
private Coroutine _bumpCoroutine;
|
||||
|
||||
protected override void HandleCollisionResponse(Collider2D obstacle)
|
||||
@@ -98,8 +97,6 @@ namespace Minigames.DivingForPictures
|
||||
_bumpCoroutine = null;
|
||||
}
|
||||
|
||||
_isBumping = true;
|
||||
|
||||
// Start bump coroutine
|
||||
_bumpCoroutine = StartCoroutine(BumpCoroutine(startX, targetX, duration));
|
||||
}
|
||||
@@ -142,7 +139,6 @@ namespace Minigames.DivingForPictures
|
||||
}
|
||||
|
||||
// Bump finished
|
||||
_isBumping = false;
|
||||
_bumpCoroutine = null;
|
||||
|
||||
Logging.Debug("[TileBumpCollision] Bump movement completed");
|
||||
|
||||
@@ -73,9 +73,6 @@ namespace Minigames.DivingForPictures
|
||||
// Screen normalization
|
||||
private float _screenNormalizationFactor = 1.0f;
|
||||
|
||||
// Tracks if a floating area in the middle is currently active
|
||||
private bool isFloatingAreaActive = false;
|
||||
|
||||
// Current depth of the trench
|
||||
private int _currentDepth = 0;
|
||||
|
||||
@@ -714,20 +711,6 @@ namespace Minigames.DivingForPictures
|
||||
_currentDepth++;
|
||||
Logging.Debug($"[TrenchTileSpawner] Current Depth: {_currentDepth}");
|
||||
onTileSpawned?.Invoke(tile);
|
||||
|
||||
// --- FLOATING AREA STATE MANAGEMENT ---
|
||||
Tile spawnedTile = tile.GetComponent<Tile>();
|
||||
if (spawnedTile != null)
|
||||
{
|
||||
if (spawnedTile.hasFloatingAreaMiddle || spawnedTile.continuesFloatingAreaMiddle)
|
||||
{
|
||||
isFloatingAreaActive = true;
|
||||
}
|
||||
if (spawnedTile.endsFloatingAreaMiddle)
|
||||
{
|
||||
isFloatingAreaActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -776,19 +759,6 @@ namespace Minigames.DivingForPictures
|
||||
_currentDepth++;
|
||||
Logging.Debug($"[TrenchTileSpawner] Current Depth: {_currentDepth}");
|
||||
onTileSpawned?.Invoke(tile);
|
||||
// Optionally update floating area state if needed
|
||||
Tile spawnedTile = tile.GetComponent<Tile>();
|
||||
if (spawnedTile != null)
|
||||
{
|
||||
if (spawnedTile.hasFloatingAreaMiddle || spawnedTile.continuesFloatingAreaMiddle)
|
||||
{
|
||||
isFloatingAreaActive = true;
|
||||
}
|
||||
if (spawnedTile.endsFloatingAreaMiddle)
|
||||
{
|
||||
isFloatingAreaActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user