package com.inari.firefly.physics.movement;

import com.inari.firefly.graphics.ETransform;
import com.inari.firefly.system.FFContext;

public final class DummyIntegrator implements Integrator {
    
    private float gravity;

    public final float getGravity() {
        return gravity;
    }

    public final void setGravity( float gravity ) {
        this.gravity = gravity;
    }

    @Override
    public final void integrate( FFContext context, EMovement movement, ETransform transform ) {
        final float vy = movement.getVelocityY();
        movement.setVelocityY( vy + Math.abs( ( vy / movement.mass - 1f ) * 0.2f ) );
    }

    @Override
    public final void step( FFContext context, EMovement movement, ETransform transform ) {
        System.out.println( "deltaTime: " + context.getTimeElapsed() );
        transform.move( movement.getVelocityX(), movement.getVelocityY() );
    }

}

@@ -483,32 +483,207 @@
 m transform ) %7B%0A
+        if ( movement.onGround ) %7B%0A            if ( movement.getVelocityY() != 0f ) %7B%0A                movement.setVelocityY( 0f );%0A            %7D%0A            return;%0A        %7D%0A
         final fl

fix gravity