pocketmine\entity\Entity::updateFallState PHP Méthode

updateFallState() protected méthode

protected updateFallState ( $distanceThisTick, $onGround )
    protected function updateFallState($distanceThisTick, $onGround)
    {
        if ($onGround === true) {
            if ($this->fallDistance > 0) {
                if ($this instanceof Living) {
                    $this->fall($this->fallDistance);
                }
                $this->resetFallDistance();
            }
        } elseif ($distanceThisTick < 0) {
            $this->fallDistance -= $distanceThisTick;
        }
    }