Update methods to be internal, remove invocation bloat
This commit is contained in:
@@ -20,12 +20,12 @@ public class AppleAudioSource : ManagedBehaviour
|
||||
public int sourcePriority;
|
||||
|
||||
|
||||
protected override void OnManagedAwake()
|
||||
internal override void OnManagedAwake()
|
||||
{
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
}
|
||||
|
||||
protected override void OnManagedStart()
|
||||
internal override void OnManagedStart()
|
||||
{
|
||||
AudioManager.Instance.RegisterNewAudioSource(this);
|
||||
_audioMixer = AudioManager.Instance.audioMixer;
|
||||
|
||||
@@ -44,13 +44,13 @@ public class AudioManager : ManagedBehaviour, IPausable
|
||||
public override int ManagedAwakePriority => 30; // Audio infrastructure
|
||||
public override bool AutoRegisterPausable => true; // Auto-register as IPausable
|
||||
|
||||
protected override void OnManagedAwake()
|
||||
internal override void OnManagedAwake()
|
||||
{
|
||||
// Set instance immediately (early initialization)
|
||||
_instance = this;
|
||||
}
|
||||
|
||||
protected override void OnManagedStart()
|
||||
internal override void OnManagedStart()
|
||||
{
|
||||
// Initialize lists if they were not set in inspector
|
||||
criticalVOSources = criticalVOSources ?? new List<AppleAudioSource>();
|
||||
|
||||
@@ -23,7 +23,7 @@ public class BushAudioController : ManagedBehaviour
|
||||
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
protected override void OnManagedStart()
|
||||
internal override void OnManagedStart()
|
||||
{
|
||||
_eventSource = VOPlayer.audioSource.RequestEventHandlers();
|
||||
_eventSource.AudioStopped += PlayBirdCounter;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class LevelAudioObject : ManagedBehaviour
|
||||
|
||||
public override bool AutoRegisterForSave => isOneTime; // Only save if one-time audio
|
||||
|
||||
protected override string OnSceneSaveRequested()
|
||||
internal override string OnSceneSaveRequested()
|
||||
{
|
||||
if (!isOneTime)
|
||||
return null; // No need to save if not one-time
|
||||
@@ -39,7 +39,7 @@ public class LevelAudioObject : ManagedBehaviour
|
||||
return JsonUtility.ToJson(saveData);
|
||||
}
|
||||
|
||||
protected override void OnSceneRestoreRequested(string serializedData)
|
||||
internal override void OnSceneRestoreRequested(string serializedData)
|
||||
{
|
||||
if (!isOneTime || string.IsNullOrEmpty(serializedData))
|
||||
return;
|
||||
@@ -55,7 +55,7 @@ public class LevelAudioObject : ManagedBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnSceneRestoreCompleted()
|
||||
internal override void OnSceneRestoreCompleted()
|
||||
{
|
||||
if (isOneTime && !_hasPlayed)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ public class PulverAudioController : ManagedBehaviour
|
||||
private FollowerController followerController;
|
||||
public ItemManager itemManager;
|
||||
|
||||
protected override void OnManagedStart()
|
||||
internal override void OnManagedStart()
|
||||
{
|
||||
followerController = GetComponent<FollowerController>();
|
||||
followerController.PulverIsCombining.AddListener(PulverIsCombining);
|
||||
|
||||
Reference in New Issue
Block a user