Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WEAPON_SLOT_NAME
Stores the name of the slot on the player in Spine where ranged weapon images are stored.
|
Constructor and Description |
---|
RangedWeapon(java.lang.String name,
java.lang.String description,
float damage,
float range,
float chargeTime)
Accepts the name, description, damage, and charge time of the melee weapon.
|
Modifier and Type | Method and Description |
---|---|
float |
getChargeTime()
Gets the amount of time it takes to charge the weapon.
|
Line |
getCrosshair()
Returns a line depicting where the bullet will travel when the ranged weapon is shot.
|
Vector2 |
getCrosshairPoint()
Returns the position where the start of the crosshair should be placed on the weapon.
|
float |
getRange()
Gets the range of the ranged weapon in world units.
|
void |
hit(GameObject gameObject)
Called when the RangedWeapon has hit a GameObject and should deal damage to it.
|
void |
setChargeTime(float chargeTime)
Gets the amount of time it takes to charge the weapon completely.
|
void |
setRange(float range)
Sets the range of the ranged weapon in world units.
|
getDamage, getSlotName, getWeaponAttachment, setDamage, setWeaponAttachment, setWeaponSlotName
getDescription, getItemAttachment, getName, setDescription, setItemAttachment, setName
public static final java.lang.String WEAPON_SLOT_NAME
public RangedWeapon(java.lang.String name, java.lang.String description, float damage, float range, float chargeTime)
public void hit(GameObject gameObject)
public Line getCrosshair()
public Vector2 getCrosshairPoint()
public float getRange()
public void setRange(float range)
public float getChargeTime()
public void setChargeTime(float chargeTime)