/**
 * @author Richard Eric M. Lope (Relminator)
 * http://rel.phatcode.net
 *
 */

package net.phatcode.rel.gameframework;


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);
	}

}
