Path to the idle weapon image
Width in px of the weapon images
Height in px of the weapon images
Is non automatic eg. pistol, revolver, etc
How long a shot lasts in second
Color of the muzzle flash (#RRGGBB)
Mocking class of Image2D for testing purposes
Index for this.shootImages
Image shown when the gun's not being shot (idle)
Color (#RRGGBB) of the gunshot flash color
Is the muzzle flash currently going on? If yes, the renderer will render a bright flash.
Determines if the weapon is semi-automatic. If false, it's automatic. The idea when a weapon is semi-automatic is that you have to click for each shot (as opposed to an automatic weapon where you can just hold down the button and keep shooting).
How long one weapon animation frame lasts in seconds. It's a fraction of this.shootDuration
Determines how long the shooting animation lasts in seconds.
Image set used to animate when the gun is shot
Time elapsed since the last shooting animation image in seconds. Used as an animation timekeeping variable. So if a certain time has passed (this.shootAnimDuration), then we swap to the next weapon animation image.
In which state the weapon animation is
Color of the muzzle flash that's going to be rendered on the floor near color gradient.
Also corresponds with shoot frequency. Determines after which timespan a shot can be fired.
How fast the weapon bobs. A faster factor here may be used to animate faster walking speeds
A factor used in the renderer to animate the weapon swaying (bobbing) from left to right. This effectively sets the "radius", kind of like a stride length.
magnification of weapon images on the screen
Getter for current image of the weapon. Note: this method considers the animations!
Getter for muzzle flash color
Get the state the weapon's in right now
whether or not the muzzle flash should be animated or not
true if this weapon is semi auto
Timekeeping method to cycle the weapon shoot animation and set muzzle flash status.
Time passed in seconds (probably taken from the gameloop)
Generated using TypeDoc
The weapon that is show for the user's player