mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-06 10:05:52 +02:00
task 13
This commit is contained in:
@@ -8,10 +8,12 @@
|
||||
package pp.battleship.client.gui;
|
||||
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.jme3.scene.Geometry;
|
||||
import com.jme3.scene.Node;
|
||||
import com.jme3.scene.Spatial;
|
||||
import pp.battleship.model.Battleship;
|
||||
import pp.battleship.model.Shell;
|
||||
import pp.battleship.model.Shot;
|
||||
import pp.util.Position;
|
||||
|
||||
@@ -36,6 +38,7 @@ class MapViewSynchronizer extends ShipMapSynchronizer {
|
||||
|
||||
// The MapView associated with this synchronizer
|
||||
private final MapView view;
|
||||
private Shell shell;
|
||||
|
||||
/**
|
||||
* Constructs a new MapViewSynchronizer for the given MapView.
|
||||
@@ -122,4 +125,16 @@ class MapViewSynchronizer extends ShipMapSynchronizer {
|
||||
private Geometry shipLine(float x1, float y1, float x2, float y2, ColorRGBA color) {
|
||||
return view.getApp().getDraw().makeFatLine(x1, y1, x2, y2, SHIP_DEPTH, color, SHIP_LINE_WIDTH);
|
||||
}
|
||||
public void update(float deltaTime) {
|
||||
if (shell != null) {
|
||||
shell.updatePosition(deltaTime);
|
||||
drawShell(shell.getCurrentPosition());
|
||||
}
|
||||
}
|
||||
|
||||
private void drawShell(Vector3f position){
|
||||
//TODO implement
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user