Package one.empty3.apps.opad
Class PositionUpdateImpl
- java.lang.Object
-
- one.empty3.apps.opad.PositionUpdateImpl
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.lang.Runnable
,java.util.EventListener
,PositionUpdate
public class PositionUpdateImpl extends java.lang.Object implements PositionUpdate, java.lang.Runnable, java.awt.event.ActionListener
-
-
Field Summary
Fields Modifier and Type Field Description protected double
angle
protected double
angleY
protected Point3D
direction
protected double
directionNorme
protected Point3D
directionOrigine
protected Path
path
protected Point3D
position
protected double
positionIncrement
protected double
positionIncrement2
protected CompletePositionMobile
positionMobile
protected Point3D
positionOrigine
protected static int
STATE_GAME_IN_PROGRESS
-
Constructor Summary
Constructors Constructor Description PositionUpdateImpl(Terrain t, Player player)
-
Method Summary
-
-
-
Field Detail
-
path
protected Path path
-
STATE_GAME_IN_PROGRESS
protected static int STATE_GAME_IN_PROGRESS
-
positionOrigine
protected Point3D positionOrigine
-
position
protected Point3D position
-
positionIncrement
protected double positionIncrement
-
positionIncrement2
protected double positionIncrement2
-
directionNorme
protected double directionNorme
-
directionOrigine
protected Point3D directionOrigine
-
direction
protected Point3D direction
-
angle
protected double angle
-
angleY
protected double angleY
-
positionMobile
protected CompletePositionMobile positionMobile
-
-
Method Detail
-
getAngle
public double getAngle()
- Specified by:
getAngle
in interfacePositionUpdate
-
directionY
public Point2D directionY()
- Specified by:
directionY
in interfacePositionUpdate
-
getCircuit
public Circuit getCircuit()
- Specified by:
getCircuit
in interfacePositionUpdate
-
energy
public double energy()
- Specified by:
energy
in interfacePositionUpdate
-
update
public void update()
- Specified by:
update
in interfacePositionUpdate
-
isPositionOk
protected boolean isPositionOk(Point3D p, boolean repositionne)
-
getVecDir2D
public Point3D getVecDir2D()
- Specified by:
getVecDir2D
in interfacePositionUpdate
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
acc
public void acc(long timeNano)
- Specified by:
acc
in interfacePositionUpdate
-
dec
public void dec(long timeNano)
- Specified by:
dec
in interfacePositionUpdate
-
plot
public boolean plot(Point3D position, Point3D deplacement, Cube plottee)
- Specified by:
plot
in interfacePositionUpdate
-
moveUp
public void moveUp(long timeKeyPress)
- Specified by:
moveUp
in interfacePositionUpdate
-
moveDown
public void moveDown(long timeKeyPress)
- Specified by:
moveDown
in interfacePositionUpdate
-
state
public int state()
- Specified by:
state
in interfacePositionUpdate
-
rotationGauche
public void rotationGauche(long timeNano)
- Specified by:
rotationGauche
in interfacePositionUpdate
-
rotationDroite
public void rotationDroite(long timeNano)
- Specified by:
rotationDroite
in interfacePositionUpdate
-
testCollision
public void testCollision(PositionMobile positionMobile)
- Specified by:
testCollision
in interfacePositionUpdate
-
ennemi
public void ennemi(Bonus e)
- Specified by:
ennemi
in interfacePositionUpdate
-
score
public int score()
- Specified by:
score
in interfacePositionUpdate
-
estGagnant
public boolean estGagnant()
- Specified by:
estGagnant
in interfacePositionUpdate
-
calcCposition
public Point3D calcCposition()
- Specified by:
calcCposition
in interfacePositionUpdate
-
calcDirection
public Point3D calcDirection()
- Specified by:
calcDirection
in interfacePositionUpdate
-
getHauteur
public double getHauteur()
-
STATE_GAME_IN_PROGRESS
public int STATE_GAME_IN_PROGRESS()
- Specified by:
STATE_GAME_IN_PROGRESS
in interfacePositionUpdate
-
calculerPositionAuSol
public Point3D calculerPositionAuSol(Point2D position2D)
- Specified by:
calculerPositionAuSol
in interfacePositionUpdate
-
calculerPositionModule
public Point3D calculerPositionModule(Point2D position2D)
- Specified by:
calculerPositionModule
in interfacePositionUpdate
-
getTerrain
public Terrain getTerrain()
- Specified by:
getTerrain
in interfacePositionUpdate
-
setTerrain
public void setTerrain(Terrain t)
- Specified by:
setTerrain
in interfacePositionUpdate
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
getPlotter3D
public Plotter3D getPlotter3D()
- Specified by:
getPlotter3D
in interfacePositionUpdate
-
setPlotter3D
public void setPlotter3D(Plotter3D plotter3D)
- Specified by:
setPlotter3D
in interfacePositionUpdate
-
getPositionMobile
public PositionMobile getPositionMobile()
- Specified by:
getPositionMobile
in interfacePositionUpdate
-
getPath
public Path getPath()
- Specified by:
getPath
in interfacePositionUpdate
-
setPath
public void setPath(Path path)
- Specified by:
setPath
in interfacePositionUpdate
-
setMain
public void setMain(DarkFortressGUI darkFortressGUI)
- Specified by:
setMain
in interfacePositionUpdate
-
getMain
public DarkFortressGUI getMain()
- Specified by:
getMain
in interfacePositionUpdate
-
getPlayer
public Player getPlayer()
-
-