I want my actor to move faster when he eats a pill I've look at several discussions on the topic but non had this specific topic so how can I make my actor change speed
private int speed = 1;
if (speed == 1) speed = 2;
move(speed);
private int speedTimer;
if (speedTimer > 0) speedTimer--; // run timer move(1+(int)Math.signum(speedTimer));
speedTimer = 120; // set timer