gizmoball.gameworld.gameobjects
Class Absorber
java.lang.Object
gizmoball.gameworld.GameObject
gizmoball.gameworld.Gizmo
gizmoball.gameworld.gameobjects.BallShooter
gizmoball.gameworld.gameobjects.Absorber
- Direct Known Subclasses:
- LimitedAbsorber
public class Absorber
- extends BallShooter
A Gizmo that is the absorber at the bottom of the screen, that collects balls
and then shoots them up.
- Specification Fields
-
-
corner1
: point // one of the corners of the physics model
-
corner2
: point // the opposite corner of the physics model
Constructor Summary |
Absorber(Vect3 corner1,
Vect3 corner2)
Creates a new Absorber. |
Absorber(Vect3 corner1,
Vect3 corner2,
Vect3 shootSpeed)
Creates a new Absorber, which shoots the balls out with the specified
velocity. |
Methods inherited from class gizmoball.gameworld.gameobjects.BallShooter |
addBall, doActivate, doUpdate, getBallPlacementDiff, getDefaultTriggers, getDelay, getFirstBallLocation, getShootSpeed, getShootTranslate, rotateAboutAxis, translateBy |
Methods inherited from class gizmoball.gameworld.Gizmo |
activate, copy, getBoundingBox, getCoeffReflectionString, getColorString, getCommonAttributesString, getOrientationDoubleString, getOrientationString, getReflectionCoeff, getTextureString, getTranslationString, getXMLDelay, getXMLDelayString, setCoefficientOfReflection, setCommonAttributes, setDelay, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Absorber
public Absorber(Vect3 corner1,
Vect3 corner2,
Vect3 shootSpeed)
- Creates a new Absorber, which shoots the balls out with the specified
velocity.
- Parameters:
corner1
- one corner of the boxcorner2
- the opposite corner of the boxshootSpeed
- the velocity of the balls shot out- Requires:
- corner1 != corner2
Absorber
public Absorber(Vect3 corner1,
Vect3 corner2)
- Creates a new Absorber.
- Parameters:
corner1
- one corner of the boxcorner2
- the opposite corner of the box
getGraphicsProperties
public GraphicsProperties getGraphicsProperties()
- Description copied from class:
GameObject
- Returns an object that holds the information necessary for drawing this
object. Making changes to this object changes the underlying object, so
those changes will be reflected in the drawer.
- Specified by:
getGraphicsProperties
in class GameObject
- Returns:
- all the information needed to draw this object.
getPhysicsModel
public PhysicsModel getPhysicsModel()
- Description copied from class:
Gizmo
- Returns the physical model of this gizmo. The model stores the structure,
as well as velocity, rotation, and rotation of this gizmo.
- Specified by:
getPhysicsModel
in class Gizmo
- Returns:
- this.physicsModel
getXMLString
public java.lang.String getXMLString(java.lang.String name)
- Description copied from class:
GameObject
- returns the XML string that would be used to save this game object
- Specified by:
getXMLString
in class GameObject
- Returns:
- String s where s is sufficient to be directly inserted into an
XML file where game world information is being saved