public void SetBikeData(string bikeID, PointOfTime patientData) { foreach (BicycleCustomControl bike in bikes) { if (bike.bikeID == bikeID) { bike.SetPatientData(patientData); } } }
public void SetPatientData(PointOfTime patientData) { Invoke(new Action(() => { Tuple <int, int> values = ConvertDoubleToTuple(patientData.power); ChangePower(values.Item1, values.Item2); values = ConvertDoubleToTuple(patientData.speed); ChangeSpeed(values.Item1, values.Item2); values = ConvertDoubleToTuple(patientData.bikeTime); ChangeTime(values.Item1, values.Item2); values = ConvertDoubleToTuple(patientData.distance); ChangeDistance(values.Item1, values.Item2); })); }
void Rewind() { if (pointsInTime.Count > 0) { PointOfTime pointInTime = pointsInTime[0]; transform.position = pointInTime.position; transform.rotation = pointInTime.rotation; pointsInTime.RemoveAt(0); } else { StopRewind(); } }