Priz 4 дней назад
Родитель
Сommit
cbaefd663c

+ 3 - 6
GAMEN3-ValleyRunner_SanTi036/Assets/Scripts/EnergyOrb.cs

@@ -3,11 +3,11 @@ using UnityEngine;
 public class EnergyOrb : MonoBehaviour
 {
     [Header("Orb Save Data")]
-    public string ID;  // unique ID for each of this orb
+    public string ID;
     public bool Collected = false;
 
     [Header("Sound")]
-    public AudioClip pickupSound;   // assign your .wav in the inspector
+    public AudioClip pickupSound;
     public float volume = 1f;
 
     private void OnTriggerEnter(Collider other)
@@ -16,17 +16,14 @@ public class EnergyOrb : MonoBehaviour
         {
             Collected = true;
 
-            // Play the pickup sound without needing the orb to stay active
             if (pickupSound != null)
             {
-                // Play from the main camera (or any object that won't be disabled)
+                // Play from the main camera
                 AudioSource.PlayClipAtPoint(pickupSound, Camera.main.transform.position, volume);
             }
 
-            // Send the GameManager that it's been collected
             GameManager.Instance.CollectOrb();
 
-            // Deactivate the orb
             gameObject.SetActive(false);
         }
     }

+ 0 - 2
GAMEN3-ValleyRunner_SanTi036/Assets/Scripts/LoadingManager.cs

@@ -94,8 +94,6 @@ public class LoadingManager : MonoBehaviour
                 // Wait one frame to ensure GameManager is awake
                 yield return null;
 
-                if (GameManager.Instance == null) Debug.LogError("GameManager not found on scene load!");
-
 
                 if (GameManager.Instance != null)
                 {