private void ConfigureLevel() { if (PlayerPrefs.HasKey(worldName)) { int r = PlayerPrefs.GetInt(worldName); if (currentRound > r) { PlayerPrefs.SetInt(worldName, currentRound); } } else { PlayerPrefs.SetInt(worldName, currentRound); } MapConfigurationManager mapManager = GameObject.FindObjectOfType <MapConfigurationManager>(); if (mapManager != null) { mapManager.ChooseConfiguration(currentDifficulty); } player = GameObject.FindGameObjectWithTag("Player"); player.SendMessage("SetFreezeInput", true, SendMessageOptions.RequireReceiver); Instantiate(roundStartUI); MusicManager.FadeHighpass(); RoundStartSequence.OnPlay += OnLevelBegin; }
public void OnLevelBegin() { MusicManager.FadeToNormal(); RoundStartSequence.OnPlay -= OnLevelBegin; MapConfigurationManager mapManager = GameObject.FindObjectOfType <MapConfigurationManager>(); mapManager.PlayMap(); if (player == null) { player = GameObject.FindGameObjectWithTag("Player"); } player.SendMessage("SetFreezeInput", false, SendMessageOptions.RequireReceiver); }