public void SetRaceInfo(RaceInfo ri) { totalLaps = ri.totalLaps; countdownSec = ri.countdownSec; detectCrash = ri.detectCrash; crashTolerance = ri.crashTolerance; restartAt = ri.restartAt; }
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()); }
public RaceInfo(RaceInfo ri) { SetRaceInfo(ri); }