Beispiel #1
0
    static GameManager()
    {
        PlayerSpawnPosition = Vector3.zero;
        minigameSettings    = JSONManager.LoadDirectory <Dictionary <string, float[]> >("Minigames");
        highscores          = JSONManager.Load <List <Highscore> >("Highscores");

        minigames = JSONManager.Load <string[]>("Minigames");
        bars      = JSONManager.Load <string[]>("Bars");
        string[] minigamesToAssignArray = minigames.Clone() as string[];
        for (int i = minigames.Length - 1; i >= 0; i--)
        {
            int    j   = Random.Range(0, i + 1);
            string tmp = minigamesToAssignArray[j];
            minigamesToAssignArray[j] = minigamesToAssignArray[i];
            minigamesToAssignArray[i] = tmp;
        }
        minigamesToAssign = minigamesToAssignArray.ToList();

        SelectNewBar();

        musicVolume = 1;
    }