Beispiel #1
0
    void startStream(int GameTrend)
    {
        tempCurrentHour = TS.getNextTime(ControlStreamTime.StreamTime);
        WP.tempEnergy   = WP.Energy;
        WP.tempHealth   = WP.Health;

        tempFans    = WP.Fans;
        tempMoney   = WP.Money;
        tempViewers = WP.Viewers;
        //WP.Viewers = 0;
        DC.getTargetValues();
        if (DC.DurationValue != 0)
        {
            if (WP.Energy >= DC.DurationValue && WP.Health >= DC.DurationValue)
            {
                if (DC.DurationValue == 24)
                {
                    TS.day += 1;
                    TS.ShittyFix();
                }
                mgs.gameEnabled();
                AG.ResetHighlights();
                WP.tempHealth -= DC.DurationValue;
                WP.tempEnergy -= DC.DurationValue;


                WP.Viewers          = Mathf.Clamp(Random.Range(1, GameTrend) * DC.ReturnDurationInt(), ReturnViewerMinimum(WP.Fans), WP.viewerCap);
                RS.ViewersForTheDay = WP.Viewers;
                WP.Fans            += fanLimit(Mathf.Clamp((Random.Range(0, WP.Viewers) + WP.socialMediaStat) * DC.ReturnDurationInt(), 0, WP.Viewers));
                RS.FansGainedValue  = WP.Fans - tempFans;
                WP.Money           += Mathf.Clamp((WP.Fans + (GameTrend)) * DC.ReturnDurationInt(), 0, WP.Viewers);
                RS.MoneyGainedValue = WP.Money - tempMoney;

                amIStreaming = true;
                UI.CloseGameScreen();
                StartCoroutine("CameraPerspective");
                HelpScreenScript.TPCBool = true;

                WP.ControlStreamUI(false);
                CS.InvokeRepeating("DonationCheck", 5, 5);
            }
            else
            {
                if (!warning2.activeSelf)
                {
                    warning2.SetActive(true);
                }
            }
        }
    }