/// <summary> /// Creates the level from either the level AI server or a local JSON. /// </summary> public void RequestLevel() { dirtyTimer = new LimitTimerCallback(CheckDirty, checkDirtyTime); gameManager._levelRequested = true; if (json == null) { // Connect to the server to get a JSON file. gameManager.isLoading = true; networkingManager.GetLevel(CreateLevel); } else { // Hard-coded JSON resource for testing. CreateLevel(json.text); } }
/// <summary> /// Initializes the spawner. /// </summary> protected override void Start() { base.Start(); spawnTimer = new LimitTimerCallback(SpawnLemming, spawnInterval); portal = transform.GetComponentInChildren <Portal>(); }
/// <summary> /// Initializes the key timer. /// </summary> private void Start() { keyTimer = new LimitTimerCallback(ChangeSetting, keyCooldown); surfaceManager = SurfaceManager.instance; }
/// <summary> /// Gets the level manager instance. /// </summary> private void Start() { gameManager = GameManager.instance; logTimer = new LimitTimerCallback(LogState, logDelay); player = PlayerMover.instance; }