Exemple #1
0
        public void Load(TimeTrialData.TimeTrialSaveData data)
        {
            Vector3 PointTo;

            for (int i = 0; i < data.checkpoints.Count; i++)
            {
                if (i == data.checkpoints.Count - 1)
                {
                    PointTo = data.checkpoints[0].ToGtaVector3();
                }
                else
                {
                    PointTo = data.checkpoints[i + 1].ToGtaVector3();
                }
                this.checkpoints.Add(new Checkpoint(data.checkpoints[i].ToGtaVector3(), PointTo));
            }

            if (data.type == "circuit")
            {
                this.lapEndIndex = 0;
            }
            else
            {
                this.lapEndIndex = this.checkpoints.Count - 1;
            }
        }
        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();
        }
Exemple #3
0
 public TimeTrialSetupState(TimeTrialData.TimeTrialSaveData raceData)
 {
     this.timeTrialData = raceData;
     this.setupMenu.CreateMenu(raceData.displayName, raceData.type, this.onMenuExit, this.onStart);
 }