Пример #1
0
    private void SetTracersInternal(bool saveSetting)
    {
        string item = this._tracersDropdown.options[this._tracersDropdown.@value].text;

        switch (this._tracersDropdown.@value)
        {
        case 0:
        {
            this.TracerAmount = TracerManager.TRACER_AMOUNT.ONE;
            break;
        }

        case 1:
        {
            this.TracerAmount = TracerManager.TRACER_AMOUNT.FIVE;
            break;
        }

        case 2:
        {
            this.TracerAmount = TracerManager.TRACER_AMOUNT.FIFTY;
            break;
        }

        default:
        {
            this.TracerAmount = TracerManager.TRACER_AMOUNT.ONE;
            break;
        }
        }
        if (saveSetting || this._saveSettingsGlobal)
        {
            this.SaveSettingToJson(GameSettings.GameSetting.TracesValue, item);
            this.SaveSessionSettingsToPlayerPrefsIfEnabled(false);
        }
        CGameManager.instance.UiHolder.TracerManager.ChangeTracerDisplay(this.TracerAmount);
    }
Пример #2
0
    public void ChangeTracerDisplay(TracerManager.TRACER_AMOUNT amount)
    {
        this.tracerAmount = amount;
        this.DisableAll();
        int num  = 0;
        int num1 = 0;

        while (num1 < this.golfBalls.Count)
        {
            if (num != (int)amount)
            {
                if (this._includeBallsOnTeeOrFlight || this.golfBalls[num1].isFlightComplete)
                {
                    this.golfBalls[num1].SetTrailActive(true);
                    num++;
                }
                else
                {
                    this.golfBalls[num1].SetTrailActive(false);
                }
                num1++;
            }
            else
            {
                break;
            }
        }
        //if (this._numericDisplays != null)
        //{
        //	this._numericDisplays.DrawLines();
        //}
        //if (this._numericDisplayStatic != null)
        //{
        //	this._numericDisplayStatic.DrawLines();
        //}
    }