重构前夕
This commit is contained in:
@@ -278,8 +278,10 @@ namespace Demo.Game
|
||||
|
||||
private bool IsScrollTimeline = false;
|
||||
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
public ProfilerMarker s_PreparePerfMarkerForSetSongCurrentTime = new(nameof(GameController) + "RuntimeForSetSongCurrentTime");
|
||||
public ProfilerMarker s_PreparePerfMarker = new(nameof(GameController) + "Runtime");
|
||||
#endif
|
||||
|
||||
private void Update()
|
||||
{
|
||||
@@ -293,15 +295,21 @@ namespace Demo.Game
|
||||
// TODO : 修正这个逻辑,这个逻辑是反常的
|
||||
if (MainAudio.IsPlaying())
|
||||
{
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
s_PreparePerfMarkerForSetSongCurrentTime.Begin();
|
||||
#endif
|
||||
SetSongCurrentTime(CurrentTime);
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
s_PreparePerfMarkerForSetSongCurrentTime.End();
|
||||
#endif
|
||||
MainObject.ScriptUpdate(CurrentTime, deltaTime, ScriptableObject.TickType.Update);
|
||||
}
|
||||
if (IsMain == false)
|
||||
return;
|
||||
|
||||
#if UNITY_EDITOR || Using_ProfilerMarker
|
||||
s_PreparePerfMarker.Begin(this);
|
||||
#endif
|
||||
#if UNITY_EDITOR
|
||||
if (Keyboard.current[Key.LeftShift].isPressed)
|
||||
#else
|
||||
@@ -348,7 +356,9 @@ namespace Demo.Game
|
||||
}
|
||||
}
|
||||
}
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
s_PreparePerfMarker.End();
|
||||
#endif
|
||||
}
|
||||
|
||||
public IEnumerator GameExit()
|
||||
|
||||
Reference in New Issue
Block a user