#pragma once

#include <Urho3D/Scene/LogicComponent.h>

using namespace Urho3D;

class Airborne : public LogicComponent
{
    URHO3D_OBJECT(Airborne, LogicComponent);

public:
    Airborne(Context* context);

    static void RegisterObject(Context* context);

    virtual void Start() override;
    virtual void FixedUpdate(float timeStep) override;


private:
    void HandleNodeCollision(StringHash eventType, VariantMap& eventData);

    bool onGround_;
    bool previousStepOnGround_;
    float inAirTimer_;
};
