mirror of
https://github.com/Noratrieb/Java2DGame.git
synced 2026-01-15 22:45:00 +01:00
fixed size scaling
This commit is contained in:
parent
adb8e185fb
commit
e841bb4188
11 changed files with 12 additions and 13 deletions
|
|
@ -42,7 +42,7 @@ public class Coords {
|
|||
|
||||
public static Vector2D getWorldCoordsSize(Vector2D value) {
|
||||
//TODO h not w
|
||||
double x = (value.x / Master.SCREEN_Y_COORDINATES * master.getW());
|
||||
double x = (value.x / Master.SCREEN_Y_COORDINATES * master.getH());
|
||||
double y = (value.y / Master.SCREEN_Y_COORDINATES * master.getH());
|
||||
return new Vector2D(x, y);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class Master extends JPanel {
|
|||
|
||||
|
||||
BattleShip battleShip = new BattleShip(Color.DARK_GRAY);
|
||||
BattleShip bs = new BattleShip(70, 10, 5, 80, Color.GREEN);
|
||||
BattleShip bs = new BattleShip(140, 10, 10, 80, Color.GREEN);
|
||||
/*for (int i = 0; i < 10; i++) {
|
||||
bs.addTurret(new Turret(bs, 25, 10 * i + 1, 50, i % 5));
|
||||
}*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue