示例#1
0
        public void SetRaceInfo(RaceInfo ri)
        {
            totalLaps = ri.totalLaps;

            countdownSec = ri.countdownSec;

            detectCrash    = ri.detectCrash;
            crashTolerance = ri.crashTolerance;

            restartAt = ri.restartAt;
        }
示例#2
0
        void InitLocalRaceData()
        {
            localRaceInfo = new RaceInfo(
                (int)PlayerPrefs.GetFloat(Constants.TotalLaps),
                PlayerPrefs.GetFloat(Constants.CountdownTimeSec),
                PlayerPrefs.GetInt(Constants.DetectCrash) == 0 ? false : true,
                PlayerPrefs.GetFloat(Constants.CrashTolerance),
                (RestartAt)PlayerPrefs.GetInt(Constants.RestartAt)
                );

            raceInfo = new RaceInfo(localRaceInfo);

            curAirGateIdx = -1;
            lapCount      = 0;

            firstThresholdCrossed = false;
            lapThresholdCrossed   = false;

            //Debug.Log("InitLocalRaceData  localRaceInfo=" + localRaceInfo.ToString());
        }
示例#3
0
 public RaceInfo(RaceInfo ri)
 {
     SetRaceInfo(ri);
 }