|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.event.KeyAdapter components.GameObject components.Absorber
public class Absorber
Absorber is a mutable object that can take in a ball and shoot it out.
height
: int
width
: int
depth
: int
Field Summary |
---|
Fields inherited from class components.GameObject |
---|
center, coRef, delay, depth, frozen, g, height, name, orientAngle, orientVect, selected, shape, targets, velocity, visible, width |
Constructor Summary | |
---|---|
Absorber(Map<String,String> p,
GameSpace g)
Construct an absorber in GameSpace g with the given properties |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
This is overriden in objects where something actually occurs when triggered, for example, Flippers |
void |
clearObject()
remove the object from the absorber |
void |
getBasicPropertyMap(Map<String,String> m)
changes the map to represent the values of this GameObject required by the xml spec |
Vect3 |
getBRB()
the bottom-right-back corner of this absorber |
GameObjectClassification |
getGOClassification()
Requires that all obejects return their own classification |
GameObject |
getObject()
the object held by the absorber |
Set<Vect3> |
getOccupiedPositions()
|
void |
hold(GameObject projectile)
hold on to the given projectile |
boolean |
isFull()
true if the absorber is already holding something |
void |
onCollision(GameObject projectile)
|
protected Shape |
shape()
the Shape of the object |
Methods inherited from class components.GameObject |
---|
action, addTarget, clearTargets, defaults, equals, getBounds, getCenter, getCoRef, getDelay, getDepth, getDiff, getGameSpace, getHeight, getName, getNonRoundedTLF, getOrientAngle, getOrientVector, getRoundedTLF, getShape, getTargets, getTLF, getVelocity, getWidth, hashCode, isFrozen, isSelected, isVisible, putInVect3, putInVect3, removeTarget, setCenter, setCoRef, setDelay, setDepth, setFrozen, setHeight, setOrientAngle, setOrientVect, setProperty, setSelected, setTLF, setVelocity, setVisible, setWidth, stepFrame, toString |
Methods inherited from class java.awt.event.KeyAdapter |
---|
keyPressed, keyReleased, keyTyped |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Absorber(Map<String,String> p, GameSpace g)
Method Detail |
---|
public void onCollision(GameObject projectile)
onCollision
in class GameObject
public Vect3 getBRB()
public void hold(GameObject projectile)
IllegalArgumentException
- if projectile is null or projectil is not a ballpublic void actionPerformed(ActionEvent e)
GameObject
actionPerformed
in interface ActionListener
actionPerformed
in class GameObject
public GameObjectClassification getGOClassification()
GameObject
getGOClassification
in class GameObject
public void getBasicPropertyMap(Map<String,String> m)
GameObject
getBasicPropertyMap
in class GameObject
protected Shape shape()
GameObject
shape
in class GameObject
public Set<Vect3> getOccupiedPositions()
getOccupiedPositions
in class GameObject
public GameObject getObject()
public void clearObject()
public boolean isFull()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |