vooga.examples.networking.zombies.weapons
Class Bullet

java.lang.Object
  extended by com.golden.gamedev.object.Sprite
      extended by vooga.engine.core.BetterSprite
          extended by vooga.examples.networking.zombies.weapons.Bullet

public class Bullet
extends BetterSprite

A bullet is the base unit for the attack algorithm in this game. Each weapons spawns a bullet or bullets with different attributes. All


Constructor Summary
Bullet(double x, double y, double bulletAngle, int bulletDamage, double bulletSpeed)
           
 
Method Summary
 double getDamage()
          Get the damage of this bullet.
 void update(long elapsedTime)
          Update the location of this bullet.
 
Methods inherited from class vooga.engine.core.BetterSprite
addAnimatedImages, addHorizontalSpeed, addImage, addSprite, addVerticalSpeed, firstRun, forceX, forceY, getCurrentSprite, getDistance, getDoubleStat, getHeight, getHorizontalSpeed, getImage, getIntStat, getStat, getTimeInExistence, getVerticalSpeed, getWidth, getX, getY, isActive, isOnScreen, move, moveTo, moveX, moveY, render, setActive, setAsRenderedSprite, setBackground, setDoubleStat, setHorizontalSpeed, setImage, setImages, setIntStat, setLayer, setLocation, setMovement, setSpeed, setStat, setVerticalSpeed, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bullet

public Bullet(double x,
              double y,
              double bulletAngle,
              int bulletDamage,
              double bulletSpeed)
Method Detail

getDamage

public double getDamage()
Get the damage of this bullet. Returns a random damage within 10% of the weapon damage

Returns:
damage of the current bullet

update

public void update(long elapsedTime)
Update the location of this bullet. Used for animation

Overrides:
update in class BetterSprite