示例#1
0
    void Start()
    {
        deactivatePlayerCollisions();

        uiManager = FindObjectOfType <UIManager>();

        transform.position = GameManager.PlayerSpawnPosition;

        drunkMaluses = JSONManager.Load <Dictionary <GameManager.Drunkness, DrunkMalus> >("DrunkMaluses");

        DrunkMalus currentDrunkMalus = drunkMaluses[GameManager.DrunkLevel];

        nextKeyRandomizationTime = Time.time
                                   + GaussianDistribution.Generate(currentDrunkMalus.keyRandomizationMeanTime, currentDrunkMalus.keyRandomizationVarianceTime);
    }
示例#2
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;
    }
示例#3
0
 void Start()
 {
     drunkTags = JSONManager.Load <string[]>("DrunkTags");
     updateDrunknessIndicator();
     updateHealthIndicator();
 }