ActionGameManager.RunLive gates the renderer's Update paths too
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f7d5a7d2a8
commit
796a7af9ef
2 changed files with 6 additions and 2 deletions
|
|
@ -106,6 +106,9 @@ public class ActionGameManager : MonoBehaviour
|
|||
}
|
||||
|
||||
public static Galaxy CurrentGalaxy;
|
||||
// Whether a run is live: a failed start and a finished run both clear the galaxy, and the scene's update paths (this
|
||||
// manager's, the renderer's) step and draw nothing without one.
|
||||
public static bool RunLive => CurrentGalaxy != null;
|
||||
// The scenario a new run starts from: MainMenu.Launch sets it, and StartGame's new-run branch consumes it once.
|
||||
public static Scenario PendingScenario;
|
||||
|
||||
|
|
@ -1339,8 +1342,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
void Update()
|
||||
{
|
||||
// No live run (a start that failed, a run that ended): the main menu is up, and nothing steps a zone or reads a player.
|
||||
if (CurrentGalaxy == null) return;
|
||||
if (!RunLive) return;
|
||||
if(!_paused)
|
||||
{
|
||||
_time += Time.deltaTime;
|
||||
|
|
|
|||
|
|
@ -508,6 +508,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
void LateUpdate()
|
||||
{
|
||||
if (!ActionGameManager.RunLive) return;
|
||||
Map.Draw(Zone, ActionGameManager.Clock.Lead);
|
||||
}
|
||||
|
||||
|
|
@ -550,6 +551,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
void Update()
|
||||
{
|
||||
if (!ActionGameManager.RunLive) return;
|
||||
var lead = ActionGameManager.Clock.Lead;
|
||||
GravityLowering.Lower(Zone, lead, ref _gravityWells);
|
||||
foreach (var loot in _floatingItems.Values)
|
||||
|
|
|
|||
Loading…
Reference in a new issue