|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgizmoball.gameworld.GameObject
gizmoball.gameworld.Gizmo
gizmoball.gameworld.gameobjects.ShipGizmo
public class ShipGizmo
A ShipGizmo represents the player's ship in Multiplayer Space Invaders.
shootDifference
: vector // the vector between the position and
the bullet position
shootSpeed
: velocity // the speed with which the balls are shot
maximumMovement
: double // the maximum linear distance that you
can move to either side
rateOfFire
: double // the number of seconds between shots
draggedGizmos
: list // the gizmos that follow this around
Field Summary |
---|
Fields inherited from class gizmoball.gameworld.Gizmo |
---|
orientation, totalTranslation |
Constructor Summary | |
---|---|
ShipGizmo(Vect3 tip,
double depth,
Vect3 away,
double length,
double shootSpeed,
GameWorldState ws,
double maximumMovement,
double rateOfFire,
java.util.List<Gizmo> draggedGizmos)
Creates a ship, in the form of an arrow. |
Method Summary | |
---|---|
void |
addDraggedGizmo(Gizmo g)
|
void |
doActivate()
Immediately "activates" this gizmo. |
protected void |
doUpdate(double dt)
The same as GameObject.update(). |
GraphicsProperties |
getGraphicsProperties()
Returns an object that holds the information necessary for drawing this object. |
java.util.List<Gun> |
getGuns()
Gets the list of guns that are on this ship. |
PhysicsModel |
getPhysicsModel()
Returns the physical model of this gizmo. |
java.lang.String |
getXMLString(java.lang.String name)
returns the XML string that would be used to save this game object |
void |
increaseRateOfFire(double multiplier)
|
void |
moveLeft()
|
Trigger |
moveLeftTrigger()
|
void |
moveRight()
|
Trigger |
moveRightTrigger()
|
void |
rotateAboutAxis(Vect3 center,
Vect3 axis,
double angle)
Rotates this |
Methods inherited from class gizmoball.gameworld.Gizmo |
---|
activate, copy, getBoundingBox, getCoeffReflectionString, getColorString, getCommonAttributesString, getDefaultTriggers, getOrientationDoubleString, getOrientationString, getReflectionCoeff, getTextureString, getTranslationString, getXMLDelay, getXMLDelayString, setCoefficientOfReflection, setCommonAttributes, setDelay, translateBy, update |
Methods inherited from class gizmoball.gameworld.GameObject |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ShipGizmo(Vect3 tip, double depth, Vect3 away, double length, double shootSpeed, GameWorldState ws, double maximumMovement, double rateOfFire, java.util.List<Gizmo> draggedGizmos)
tip
- the location of the tip of the shipdepth
- the depth of the shipaway
- the vector from tip to the center of the shiplength
- the length of the shipshootSpeed
- the velocity of shots firedws
- the world state that the shots will be added to. must contain
at least one player, and the first player has a score and
lives counter.maximumMovement
- the maximum linear distance that you can move to either siderateOfFire
- the number of seconds between each shotdraggedGizmos
- the gizmos carried by the shipMethod Detail |
---|
public void addDraggedGizmo(Gizmo g)
public java.util.List<Gun> getGuns()
public void increaseRateOfFire(double multiplier)
public void doActivate()
Gizmo
doActivate
in class Gizmo
protected void doUpdate(double dt)
Gizmo
doUpdate
in class Gizmo
public Trigger moveRightTrigger()
public Trigger moveLeftTrigger()
public void moveRight()
public void moveLeft()
public void rotateAboutAxis(Vect3 center, Vect3 axis, double angle)
Gizmo
rotateAboutAxis
in class Gizmo
public PhysicsModel getPhysicsModel()
Gizmo
getPhysicsModel
in class Gizmo
public GraphicsProperties getGraphicsProperties()
GameObject
getGraphicsProperties
in class GameObject
public java.lang.String getXMLString(java.lang.String name)
GameObject
getXMLString
in class GameObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |