public class Weapon
extends java.lang.Object
Constructor and Description |
---|
Weapon(int id,
AbstractCharacter character) |
Modifier and Type | Method and Description |
---|---|
int |
getAimDistance()
Get the distance to impact point.
|
int |
getId() |
int |
getReloadingTime() |
static int |
getScaling() |
int |
getShootingTime() |
int |
getShots() |
int |
getShotsLoaded() |
static com.badlogic.gdx.graphics.g2d.TextureAtlas |
getSpritesheetBig() |
static void |
init() |
void |
reload() |
void |
renderBig(View view,
int x,
int y)
Renders a big version of the image
|
void |
setFire(com.badlogic.gdx.backends.openal.Wav.Sound fire) |
void |
setReload(com.badlogic.gdx.backends.openal.Wav.Sound reload) |
static void |
setSpritesheetBig(com.badlogic.gdx.graphics.g2d.TextureAtlas spritesheetBig) |
void |
trigger() |
void |
update(boolean trigger,
float delta)
Manages the weapon
|
public Weapon(int id, AbstractCharacter character)
id
- character
- public static void init()
public void renderBig(View view, int x, int y)
view
- x
- y
- public static com.badlogic.gdx.graphics.g2d.TextureAtlas getSpritesheetBig()
public int getId()
public static int getScaling()
public void update(boolean trigger, float delta)
trigger
- Is the trigger down?delta
- public void reload()
public int getShotsLoaded()
public int getShots()
public int getReloadingTime()
public int getShootingTime()
public void trigger()
public static void setSpritesheetBig(com.badlogic.gdx.graphics.g2d.TextureAtlas spritesheetBig)
spritesheetBig
- public void setFire(com.badlogic.gdx.backends.openal.Wav.Sound fire)
fire
- public void setReload(com.badlogic.gdx.backends.openal.Wav.Sound reload)
reload
- public int getAimDistance()