Class GameManager
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
[DefaultExecutionOrder(-100)]
public class GameManager : Singleton<GameManager>
- Inheritance
-
objectGameManager
- Inherited Members
Fields
- InteractiveLayerMask
Layer mask for all interactive objects, including monsters, items, interactables, doors, heroes, handles, inventories, and items in inventory.
- TileAppliedTimeoutSeconds
Watchdog for the spawn terrain tile: how long the boot waits before carrying on without it.
A watchdog, not a target. The tile is produced by MapMagic, which on WebGL has to generate inline on the main thread (no worker threads exist in a browser - see Awake, where its job queue is switched off multithreading) - measured 2026-09-20: 45 s was not enough for the first 200x200 tile, so the boot entered the game without terrain. Long enough to give inline generation a real chance, still finite, because an unbounded wait here is a loading screen the player can never leave.
Properties
- IsGameStarted
Reactive view of
_isGameStarted; raisesOnIsGameStartedChangedwhen the value actually changes.
Methods
- CloseCharacterScreen()
Close the OneJS Character Screen overlay. Safe no-op if the script engine or global hook is not yet available.
- OpenCharacterScreen()
Open the OneJS Character Screen overlay. All callers (HeroController double-click, the legacy UICharacterScreen.OnEnable bridge, inspector-wired buttons via UICharacterScreen.Show) should funnel through this method so there is a single point of entry to the new UI.
- OpenPrestigeTree()
Open the OneJS Prestige Tree (Grimoire) overlay. Bridges C# UGUI buttons (death screen, etc.) to the global JS handler registered by App.tsx (
__grindfest.openPrestigeTree). Safe to call before the script engine is initialised — silently no-ops if the engine or the global hook is missing.
- TryGoSinglePlayer()
If you are not connected yet, turns of the network and starts the single player