Ejemplo n.º 1
0
 public function setSprinting($value = true)
 {
     $oldVal = $this->isSprinting();
     parent::setSprinting($value);
     if ($value !== $oldVal) {
         $value ? $sprintSpeedChange = self::DEFAULT_SPEED * 0.3 : ($sprintSpeedChange = -self::DEFAULT_SPEED * 0.3);
         $this->setMovementSpeed($this->getMovementSpeed() + $sprintSpeedChange);
     }
 }