Class SpriteWall

java.lang.Object
  |
  +--Sprite
        |
        +--SpriteWall

class SpriteWall
extends Sprite

Use a SpriteWall to visually show when the bounce flag is on, we'll trigger it using the ship.bounce inside AsteroidsGame draw. We make it a Sprite so we can use the render function to keep resizing it to the current window size.


Fields inherited from class Sprite
acceleration, active, age, ageDone, angle, angularAcceleration, bounce, edgecolor, fillcolor, fillflag, game, mass, maxspeed, ownerApp, position, positiontransform, radius, shape, shapetransform, soundplaying, velocity
 
Constructor Summary
SpriteWall(RealPixelConverter rtopc)
           
 
Method Summary
 boolean advance(double dt)
          Do-nothing advance method means don't move.
 void draw(java.awt.Graphics g, boolean detail)
          Draw method draws it as a disk if game.diskflag.
 void reset(RealPixelConverter rtopc)
          Do-nothing reset method means there's nothing to reset.
 void update(RealPixelConverter rtopc)
          Do-nothing update method means don't look at other sprites.
 
Methods inherited from class Sprite
explode, fixRadius, isColliding, isTouching, loopsound, mass, radius, randomizeFillcolor, render, setFakeRadius, stop, wrapandbounce
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

SpriteWall

public SpriteWall(RealPixelConverter rtopc)
Method Detail

advance

public boolean advance(double dt)
Do-nothing advance method means don't move.
Overrides:
advance in class Sprite

update

public void update(RealPixelConverter rtopc)
Do-nothing update method means don't look at other sprites.
Overrides:
update in class Sprite

reset

public void reset(RealPixelConverter rtopc)
Do-nothing reset method means there's nothing to reset.
Overrides:
reset in class Sprite

draw

public void draw(java.awt.Graphics g,
                 boolean detail)
Draw method draws it as a disk if game.diskflag. If bouncing we use the edgecolor (which can be either white or black). Otherwise we use gray to show a soft, wrapping edge.
Overrides:
draw in class Sprite