volume adjustable now

master
GammelJAN 5 years ago
parent 94f9b95f25
commit 3ff90a749e

@ -237,6 +237,14 @@ public class Controller extends ApplicationAdapter implements InputProcessor {
case 6:
difficulty = 4;
break;
case 7:
if(volume > 0.1) volume -= 0.1;
screen.setVolume(volume);
break;
case 8:
if(volume < 0.9) volume += 0.1;
screen.setVolume(volume);
break;
}
}

@ -78,7 +78,7 @@ public class Model {
}
}
public void finishWall(int x, int y){
if(Vector2.dst(tempStart.x,tempStart.y,x,y) > 150) {
if(Vector2.dst(tempStart.x,tempStart.y,x,y) > 50) {
double angle = StaticMath.calculateAngle(x,y,(int)tempStart.x,(int)tempStart.y);
tempPolygon = StaticMath.createPolygon((int)tempStart.x, (int)tempStart.y, angle-Math.PI,10,Vector2.dst(tempStart.x,tempStart.y,x,y));

@ -42,6 +42,11 @@ public class EndScreen extends Screen {
buttons.add(new Button(4,710,100,210,50,"Medium",Color.GRAY,Color.BLUE));
buttons.add(new Button(5,920,100,210,50,"Hard",Color.DARK_GRAY,Color.WHITE));
buttons.add(new Button(6,1130,100,210,50,"Impossible",Color.GRAY,Color.WHITE));
texts.add(new Text(50,845, "Volume:", Color.BLACK,1,0,0));
buttons.add(new Button(7,100,830,35,35,"-",Color.DARK_GRAY,Color.WHITE));
buttons.add(new Button(8,140,830,35,35,"+",Color.DARK_GRAY,Color.WHITE));
}
@Override

@ -29,6 +29,11 @@ public class MainMenuScreen extends Screen {
buttons.add(new Button(4,710,100,210,50,"Medium",Color.GRAY,Color.BLUE));
buttons.add(new Button(5,920,100,210,50,"Hard",Color.DARK_GRAY,Color.WHITE));
buttons.add(new Button(6,1130,100,210,50,"Impossible",Color.GRAY,Color.WHITE));
texts.add(new Text(50,845, "Volume:", Color.BLACK,1,0,0));
buttons.add(new Button(7,100,830,35,35,"-",Color.DARK_GRAY,Color.WHITE));
buttons.add(new Button(8,140,830,35,35,"+",Color.DARK_GRAY,Color.WHITE));
}
@Override

Loading…
Cancel
Save