Class SpriteBullet

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

class SpriteBullet
extends Sprite


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
SpriteBullet(RealPixelConverter rtopc)
           
 
Method Summary
 boolean advance(double dt)
          We'll deactivate a bullet if it wraps or bounces.
(package private)  void initialize(Sprite shooter, RealPixelConverter rtopc)
           
 void reset(RealPixelConverter rtopc)
          The abstract reset method is called by the child sprite constructors, and may also be called when resetting a sprite's state.
 void update(RealPixelConverter rtopc)
          We'll deactivate a bullet if its lifetime runs out.
 
Methods inherited from class Sprite
draw, 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

SpriteBullet

public SpriteBullet(RealPixelConverter rtopc)
Method Detail

reset

public void reset(RealPixelConverter rtopc)
Description copied from class: Sprite
The abstract reset method is called by the child sprite constructors, and may also be called when resetting a sprite's state. It needs the RealPixelConverter because if we change a sprite's postion we like to call render right away so as to have correct information in shapetransform for use by the isTouching mehtod.
Overrides:
reset in class Sprite

initialize

void initialize(Sprite shooter,
                RealPixelConverter rtopc)

advance

public boolean advance(double dt)
We'll deactivate a bullet if it wraps or bounces.
Overrides:
advance in class Sprite

update

public void update(RealPixelConverter rtopc)
We'll deactivate a bullet if its lifetime runs out.
Overrides:
update in class Sprite