Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.S))
        {
            GuestManager.SaveGuestData();
        }
        if (TheRaceManager.hasRaceStarted)
        {
            gameObject.SetActive(false);
            PreRaceCam.Priority = 0;
        }
        CurrentTotalPot       = 0;
        CurrentTotalShowPool  = 0;
        CurrentTotalPlacePool = 0;
        RaceManager racemanagerScript = TheRaceManager.GetComponent <RaceManager>();

        foreach (BetData bD in racemanagerScript.CurrentRaceBets)
        {
            if (bD.BetType == "win")
            {
                CurrentTotalPot += bD.BetAmount;
                WinPool.text     = CurrentTotalPot.ToString();
            }
            if (bD.BetType == "show")
            {
                CurrentTotalShowPool += bD.BetAmount;
                ShowPool.text         = CurrentTotalShowPool.ToString();
            }
            if (bD.BetType == "place")
            {
                CurrentTotalPlacePool += bD.BetAmount;
                PlacePool.text         = CurrentTotalPlacePool.ToString();
            }
        }
    }