mirror of
https://github.com/Noratrieb/Java2DGame.git
synced 2026-01-15 22:45:00 +01:00
package structure
This commit is contained in:
parent
b530a5d3a5
commit
3f719e573a
16 changed files with 19 additions and 21 deletions
|
|
@ -5,12 +5,12 @@ import java.awt.*;
|
|||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
class BasicEx extends JFrame {
|
||||
class Main extends JFrame {
|
||||
|
||||
Master master;
|
||||
Timer timer;
|
||||
|
||||
public BasicEx() {
|
||||
public Main() {
|
||||
initUI();
|
||||
timer = new Timer(1000/60, e -> {
|
||||
master.refresh();
|
||||
|
|
@ -40,7 +40,7 @@ class BasicEx extends JFrame {
|
|||
|
||||
EventQueue.invokeLater(() -> {
|
||||
|
||||
BasicEx ex = new BasicEx();
|
||||
Main ex = new Main();
|
||||
ex.setVisible(true);
|
||||
});
|
||||
}
|
||||
|
|
@ -3,9 +3,9 @@ package core;
|
|||
import core.math.Vector2D;
|
||||
import core.physics.Collidable;
|
||||
import core.physics.Collision;
|
||||
import objects.DebugPos;
|
||||
import core.objects.base.DebugPos;
|
||||
import objects.ships.BattleShip;
|
||||
import objects.core.GameObject;
|
||||
import core.objects.core.GameObject;
|
||||
import objects.ships.Submarine;
|
||||
import objects.world.Grid;
|
||||
import objects.world.Wall;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package objects;
|
||||
package core.objects.base;
|
||||
|
||||
import core.math.Vector2D;
|
||||
import objects.core.GameObject;
|
||||
import core.objects.core.GameObject;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package objects.core;
|
||||
package core.objects.core;
|
||||
|
||||
import core.math.Vector2D;
|
||||
import core.objects.core.GameObject;
|
||||
import core.physics.Collidable;
|
||||
import core.physics.hitboxes.Hitbox;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package objects.core;
|
||||
package core.objects.core;
|
||||
|
||||
import core.math.Coords;
|
||||
import core.Drawable;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package objects.ships;
|
||||
|
||||
import objects.core.GameObject;
|
||||
import core.objects.core.GameObject;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package objects.ships;
|
||||
|
||||
import core.math.Vector2D;
|
||||
import core.physics.hitboxes.RectHitBox;
|
||||
import objects.core.CollGameObject;
|
||||
import objects.core.GameObject;
|
||||
import core.objects.core.GameObject;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package objects.ships;
|
|||
import core.math.Coords;
|
||||
import core.math.Vector2D;
|
||||
import core.physics.hitboxes.RectHitBox;
|
||||
import objects.core.CollGameObject;
|
||||
import core.objects.core.CollGameObject;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package objects.ships;
|
|||
import core.math.Coords;
|
||||
import core.math.ExMath;
|
||||
import core.math.Vector2D;
|
||||
import objects.core.GameObject;
|
||||
import core.objects.core.GameObject;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
|
@ -83,7 +83,6 @@ public class Turret extends GameObject {
|
|||
|
||||
//TODO getCenter uses the wrong size
|
||||
Vector2D center = battleShip.getMapCoords(getCenterPosition(position));
|
||||
System.out.println(getCenterPosition(position));
|
||||
master.debugPos(battleShip.getMapCoords(position));
|
||||
master.debugPos(center);
|
||||
double targetRotation = -Math.atan2(center.x - mouseRel.x, center.y - mouseRel.y);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package objects.world;
|
||||
|
||||
import objects.core.GameObject;
|
||||
import core.objects.core.GameObject;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package objects.world;
|
|||
import core.math.Vector2D;
|
||||
import core.physics.hitboxes.Hitbox;
|
||||
import core.physics.hitboxes.RectHitBox;
|
||||
import objects.core.CollGameObject;
|
||||
import core.objects.core.CollGameObject;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue