コード例 #1
0
        /* MENU EVENT CALLBACKS
         * ======================== */
        private void onStart()
        {
            TimeTrialData.SetupData timeTrialSetup = new TimeTrialData.SetupData();

            // Get selected lap count if applicable.
            timeTrialSetup.lapCount = 0;
            if (this.timeTrialData.type == "circuit")
            {
                timeTrialSetup.lapCount = this.setupMenu.GetSelectedLapCount();
            }

            // get selected time of day.
            timeTrialSetup.timeOfDay = this.setupMenu.GetSelectedTimeOfDay();

            // get selected weather.
            timeTrialSetup.weather = this.setupMenu.GetSelectedWeather();

            // Get vehicle damage setting
            timeTrialSetup.vehicleDamageOn = this.setupMenu.GetSelectedVehicleDamage();

            // get traffic setting
            timeTrialSetup.trafficOn = this.setupMenu.GetSelectedTrafficOption();

            this.newState = new TimeTrialState.TimeTrialState(this.timeTrialData, timeTrialSetup);
        }
コード例 #2
0
        public TimeTrialState(TimeTrialData.TimeTrialSaveData data, TimeTrialData.SetupData setup)
        {
            // init time trial data and checkpoints
            this.timeTrialData = data;
            this.setup         = setup;

            // In Race Menu
            this.inRaceMenu = new GUI.InRaceMenu(this.onInRaceMenuExit, this.RestartTimeTrial, this.ExitTimeTrial);

            // setup the time trial
            this.SetupTimeTrial();

            // begin the race countdown
            this.StartCountdown();
        }