Package one.empty3.apps.opad
Class PositionUpdateImpl
java.lang.Object
one.empty3.apps.opad.PositionUpdateImpl
- All Implemented Interfaces:
ActionListener,Runnable,EventListener,PositionUpdate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacc(long timeNano) voidcalculerPositionAuSol(Point2D position2D) calculerPositionModule(Point2D position2D) voiddec(long timeNano) doubleenergy()voidbooleandoublegetAngle()doublegetMain()getPath()protected booleanisPositionOk(Point3D p, boolean repositionne) voidmoveDown(long timeKeyPress) voidmoveUp(long timeKeyPress) booleanvoidrotationDroite(long timeNano) voidrotationGauche(long timeNano) voidrun()intscore()voidsetMain(DarkFortressGUI darkFortressGUI) voidvoidsetPlotter3D(Plotter3D plotter3D) voidintstate()intvoidtestCollision(PositionMobile positionMobile) voidupdate()
-
Field Details
-
path
-
STATE_GAME_IN_PROGRESS
protected static int STATE_GAME_IN_PROGRESS -
positionOrigine
-
position
-
positionIncrement
protected double positionIncrement -
positionIncrement2
protected double positionIncrement2 -
directionNorme
protected double directionNorme -
directionOrigine
-
direction
-
angle
protected double angle -
angleY
protected double angleY -
positionMobile
-
-
Constructor Details
-
PositionUpdateImpl
-
-
Method Details
-
getAngle
public double getAngle()- Specified by:
getAnglein interfacePositionUpdate
-
directionY
- Specified by:
directionYin interfacePositionUpdate
-
getCircuit
- Specified by:
getCircuitin interfacePositionUpdate
-
energy
public double energy()- Specified by:
energyin interfacePositionUpdate
-
update
public void update()- Specified by:
updatein interfacePositionUpdate
-
isPositionOk
-
getVecDir2D
- Specified by:
getVecDir2Din interfacePositionUpdate
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
acc
public void acc(long timeNano) - Specified by:
accin interfacePositionUpdate
-
dec
public void dec(long timeNano) - Specified by:
decin interfacePositionUpdate
-
plot
- Specified by:
plotin interfacePositionUpdate
-
moveUp
public void moveUp(long timeKeyPress) - Specified by:
moveUpin interfacePositionUpdate
-
moveDown
public void moveDown(long timeKeyPress) - Specified by:
moveDownin interfacePositionUpdate
-
state
public int state()- Specified by:
statein interfacePositionUpdate
-
rotationGauche
public void rotationGauche(long timeNano) - Specified by:
rotationGauchein interfacePositionUpdate
-
rotationDroite
public void rotationDroite(long timeNano) - Specified by:
rotationDroitein interfacePositionUpdate
-
testCollision
- Specified by:
testCollisionin interfacePositionUpdate
-
ennemi
- Specified by:
ennemiin interfacePositionUpdate
-
score
public int score()- Specified by:
scorein interfacePositionUpdate
-
estGagnant
public boolean estGagnant()- Specified by:
estGagnantin interfacePositionUpdate
-
calcCposition
- Specified by:
calcCpositionin interfacePositionUpdate
-
calcDirection
- Specified by:
calcDirectionin interfacePositionUpdate
-
getHauteur
public double getHauteur() -
STATE_GAME_IN_PROGRESS
public int STATE_GAME_IN_PROGRESS()- Specified by:
STATE_GAME_IN_PROGRESSin interfacePositionUpdate
-
calculerPositionAuSol
- Specified by:
calculerPositionAuSolin interfacePositionUpdate
-
calculerPositionModule
- Specified by:
calculerPositionModulein interfacePositionUpdate
-
getTerrain
- Specified by:
getTerrainin interfacePositionUpdate
-
setTerrain
- Specified by:
setTerrainin interfacePositionUpdate
-
run
public void run() -
getPlotter3D
- Specified by:
getPlotter3Din interfacePositionUpdate
-
setPlotter3D
- Specified by:
setPlotter3Din interfacePositionUpdate
-
getPositionMobile
- Specified by:
getPositionMobilein interfacePositionUpdate
-
getPath
- Specified by:
getPathin interfacePositionUpdate
-
setPath
- Specified by:
setPathin interfacePositionUpdate
-
setMain
- Specified by:
setMainin interfacePositionUpdate
-
getMain
- Specified by:
getMainin interfacePositionUpdate
-
getPlayer
-