If the gun is reloading, then the amount of time
until it is done is decreased, if the gun has spent
long enough reloading, then it is set back to the
ready state.
Moves the range car, which moves at a certain speed, thus
for the amount of time that has elapsed, the rangecar will
move the right amount in the direction it is 'facing'.
Advances the reticle in time, essentially the reticles
are all frozen after a shot, advancing the reticle in
time will get it closer to being unfrozen.
Create a bounding box using the center of an object, its scaling
vector, its standard length, its standard width, and an error factor
that increase the size of the box
Sets the state of the projecitle to exploding over the background,
change to this state as soon as it is known that the projectile
will miss it's targets and is overshot missing even the
pathway (river).
Sets the state of the projecitle to exploding over the pathway,
change to this state as soon as it is known that the projectile
will miss it's targets and will explode on the pathway.
Creates a new projectile and sets the position,
direction, scale, and player input value Changes the
direction of the gun to point toward the reticle and
changes the state to reload
fire() -
Method in class unc.cdva.interactiveitems.Gun
Default constructor for interactive item, initializes
the interactive item with default position/direction/scale
values, does not initialize the state of the item.
Updates all movable or changeable items during
gameplay Checks if projectiles reach their
destination Checks if a new target needs to start
moving Checks if any targets hit the pathwayEnd or
are hit by a projectile Checks if reticles or guns
need to change state
This class lets you draw a right triangle on the screen
with a length label above the horizontal side and an angle label between that side
and the hypothenuse of the triangle
Setter for the landing point, the projectile will explode
when it reaches this point, the projectile will also be shot
and travel from the gun to this point.