components
Class Wall
java.lang.Object
java.awt.event.KeyAdapter
components.GameObject
components.Wall
- All Implemented Interfaces:
- ActionListener, KeyListener, EventListener
public class Wall
- extends GameObject
Wall is a mutable object that specifies the outside boundaries of a GameSpace.
Wall extends GameObject
Walls are inserted by the GameSpace itself, and are created in no other way.
- Specification Fields
-
Fields inherited from class components.GameObject |
center, coRef, delay, depth, frozen, g, height, name, orientAngle, orientVect, selected, shape, targets, velocity, visible |
Methods inherited from class components.GameObject |
action, actionPerformed, addTarget, clearTargets, equals, getBasicPropertyMap, getBounds, getCenter, getCoRef, getDelay, getDepth, getGameSpace, getHeight, getName, getNonRoundedTLF, getOrientAngle, getOrientVector, getRoundedTLF, getShape, getTargets, getTLF, getVelocity, getWidth, hashCode, isFrozen, isSelected, isVisible, onCollision, putInVect3, putInVect3, removeTarget, setCenter, setCoRef, setDelay, setDepth, setFrozen, setHeight, setOrientAngle, setOrientVect, setProperty, setSelected, setTLF, setVelocity, setVisible, setWidth, stepFrame, toString |
Wall
public Wall(Vect3 tlf,
int length,
int width,
Vect3 ov,
Angle oa,
boolean visible,
String name,
GameSpace g)
- Parameters:
tlf
- - the top left corner of the wallov
- - the normal vector to the walloa
- - tilt around ovname
- - a nameg
- - the gamespace this wall is for- Effects:
- creates a new Wall
Wall
public Wall(Map<String,String> props,
GameSpace g)
getDiff
public Vect3 getDiff()
- Description copied from class:
GameObject
- Difference between TLF and center. ZERO for balls, so should be overridden
- Overrides:
getDiff
in class GameObject
- Returns:
- a Vect3 that points from TLF to center. by default this is the center by width, height, depth
getGOClassification
public GameObjectClassification getGOClassification()
- Description copied from class:
GameObject
- Requires that all obejects return their own classification
- Specified by:
getGOClassification
in class GameObject
- Returns:
- the GameObjectClassification of this object
shape
protected Shape shape()
- Description copied from class:
GameObject
- the Shape of the object
- Specified by:
shape
in class GameObject
defaults
protected Map<String,String> defaults()
- Description copied from class:
GameObject
- sets all the defaults for this class. override in subclass if you want
different defaults
must be called at the beginning of the constructor.
- Overrides:
defaults
in class GameObject
getOccupiedPositions
public Set<Vect3> getOccupiedPositions()
- Specified by:
getOccupiedPositions
in class GameObject
- Returns:
- a vect3 not in the GameSpace