Adjacent Files

Project Info

. > app > src > main > java > james > asteroid > data > WeaponData.java

getName

Type: public String

Gets the user-facing name of the weapon.

Parameter Name Description
context An active context instance.

Returned Value: The name of the weapon; a String.

getBitmap

Type: public Bitmap

Get the Bitmap image of the weapon.

Parameter Name Description
context An active context instance.

Returned Value: The Bitmap image of the weapon.

fire

Type: public void

Fire the weapon; generate an amount of ProjectileDatas at the given x/y coordinates and add them to the passed List instance.

Parameter Name Description
projectiles The current list of projectiles being drawn.
x The current x coordinate of the player.
y The current y coordinate of the player.

loadSounds

Type: public static void

Load the weapon sounds to be played when they are fired.

Parameter Name Description
context An active context instance.
soundPool The SoundPool to load the sounds into.