public override void Destroy() { // Close and clean up the pedometer pedometer.Dispose(); pedometer = null; // save the current step state // PlayerPrefs.SetFloat(PREV_DISTANCE, (float) totalDistance); }
public DistanceQuestInput() { // prevDistance = PlayerPrefs.GetFloat (PREV_DISTANCE, 0f); prevDistance = (float)DatabaseReader.Instance().totalDistance; pedometer = new PedometerU.Pedometer(OnStep); }