package net.phatcode.rel;


public class BehaviorAccelerated extends Behavior
{
	
	public BehaviorAccelerated()
	{
		
	}

	@Override
	public void update(Entity entity)
	{
		entity.speed += entity.acceleration;
		entity.velocity.set(entity.direction);
		entity.velocity.scale( entity.speed );
		entity.velocity.add( entity.gravity );
		entity.position.add( entity.velocity );
		entity.speed -= (entity.speed * FRICTION);
	}

}
