Exemple #1
0
 /**
  * @param float $kilometer
  */
 protected function move($kilometer)
 {
     $this->TrackdataLoop->moveToDistance($kilometer);
     if (!is_null($this->RouteLoop)) {
         $this->RouteLoop->goToIndex($this->TrackdataLoop->index());
     }
 }
Exemple #2
0
 /**
  * @param int $seconds
  */
 protected function moveToTime($seconds)
 {
     $this->TrackdataLoop->moveToTime($seconds);
     if (!is_null($this->RouteLoop)) {
         $this->RouteLoop->goToIndex($this->TrackdataLoop->index());
     }
 }
Exemple #3
0
 /**
  * Check for pause
  */
 protected function checkForPause()
 {
     if (!is_null($this->Trackdata) && $this->Trackdata->hasPauses()) {
         if ($this->PauseIndex < $this->Trackdata->pauses()->num() && $this->Trackdata->pauses()->at($this->PauseIndex)->time() <= $this->Trackdata->at($this->TrackdataLoop->index(), Trackdata\Entity::TIME)) {
             $this->addCurrentPauseIcon();
             $this->PathShouldBreak = true;
             $this->PauseIndex++;
         }
     } elseif (!Configuration::ActivityView()->routeBreak()->never() && $this->RouteLoop->calculatedStepDistance() > $this->PauseLimit) {
         $this->addCurrentSegment();
     }
 }