gizmoball.gameworld.gameobjects
Class LimitedAbsorber

java.lang.Object
  extended by gizmoball.gameworld.GameObject
      extended by gizmoball.gameworld.Gizmo
          extended by gizmoball.gameworld.gameobjects.BallShooter
              extended by gizmoball.gameworld.gameobjects.Absorber
                  extended by gizmoball.gameworld.gameobjects.LimitedAbsorber

public class LimitedAbsorber
extends Absorber

A LimitedAbsorber is an Absorber that runs only when a given counter is positive.

Specification Fields :
counter : Counter // the counter controlling this

Field Summary
 
Fields inherited from class gizmoball.gameworld.Gizmo
orientation, totalTranslation
 
Constructor Summary
LimitedAbsorber(Vect3 corner1, Vect3 corner2, Counter counter)
          Creates a new LimitedAbsorber with the desired parameters
LimitedAbsorber(Vect3 corner1, Vect3 corner2, Vect3 shootSpeed, Counter counter)
          Creates a new LimitedAbsorber with the desired parameters
 
Method Summary
 void doActivate()
          Activates only if counter is positive.
 
Methods inherited from class gizmoball.gameworld.gameobjects.Absorber
getGraphicsProperties, getPhysicsModel, getXMLString
 
Methods inherited from class gizmoball.gameworld.gameobjects.BallShooter
addBall, 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 gizmoball.gameworld.GameObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LimitedAbsorber

public LimitedAbsorber(Vect3 corner1,
                       Vect3 corner2,
                       Vect3 shootSpeed,
                       Counter counter)
Creates a new LimitedAbsorber with the desired parameters

Parameters:
corner1 - one of the corners of this
corner2 - the opposite corner
shootSpeed - the velocity with which the ball is shot
counter - the counter that controls this

LimitedAbsorber

public LimitedAbsorber(Vect3 corner1,
                       Vect3 corner2,
                       Counter counter)
Creates a new LimitedAbsorber with the desired parameters

Parameters:
corner1 - one of the corners of this
corner2 - the opposite corner
counter - the counter that controls this
Method Detail

doActivate

public void doActivate()
Activates only if counter is positive.

Overrides:
doActivate in class BallShooter