public class ShootAvatar extends OrientedAvatar
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
ammo |
int[] |
ammoId |
java.lang.String[] |
ammos |
int[] |
itype |
java.lang.String |
stype |
java.lang.String[] |
stypes |
actions, actionsNIL, is_disqualified, lastMovementType, playerautotiling, bucket, bucketSharp, color, cooldown, currentFrame, draw_arrow, frameRate, frameRemaining, friction, gravity, healthPoints, hidden, hMult, image, images, img, invisible, is_avatar, is_from_avatar, is_npc, is_oriented, is_resource, is_static, is_stochastic, isFirstTick, itypes, jump_strength, lastmove, lastrect, limitHealthPoints, mass, max_speed, maxHealthPoints, name, on_ground, only_active, orientation, orientedImg, physics, physicstype, portal, randomtiling, rect, resources, rotateInPlace, rotation, shrinkfactor, singleton, size, solid, speed, spriteID, stationary, timeToLive, wMult| Constructor and Description |
|---|
ShootAvatar() |
ShootAvatar(Vector2d position,
java.awt.Dimension size,
SpriteContent cnt) |
| Modifier and Type | Method and Description |
|---|---|
VGDLSprite |
copy()
Creates a copy of this sprite.
|
void |
copyTo(VGDLSprite target)
Copies the attributes of this object to the one passed as parameter.
|
java.util.ArrayList<java.lang.String> |
getDependentSprites()
Get all sprites that affect or being affected by the current sprite
|
protected boolean |
hasAmmo(int idx) |
protected void |
loadDefaults()
Loads the default values for this sprite.
|
void |
postProcess()
Method to perform post processing when the sprite has received its parameters.
|
protected void |
reduceAmmo(int idx) |
protected void |
shoot(Game game,
int idx) |
void |
updateAvatar(Game game,
boolean requestInput,
boolean[] actionMask)
This update call is for the game tick() loop.
|
void |
updateUse(Game game) |
addScore, applyMovement, disqualify, getKeyHandler, getPlayerID, getScore, getWinState, is_disqualified, requestPlayerInput, setKeyHandler, setPlayerID, setScore, setWinState_draw, _drawHealthBar, _drawImage, _drawOriented, _drawResources, _updateOrientation, _updatePos, _updateRotation, _velocity, draw, equiv, getAmountResource, getLastPosition, getPosition, getType, groundIntersects, init, intersects, is_disabled, lastDirection, loadImage, modifyResource, parseParameters, preMovement, removeResource, setDisabled, setFromAvatar, setRect, setRect, subtractResource, toString, update, updateBucket, updatePassivepublic java.lang.String ammo
public java.lang.String[] ammos
public int[] ammoId
public java.lang.String stype
public java.lang.String[] stypes
public int[] itype
public ShootAvatar()
public ShootAvatar(Vector2d position, java.awt.Dimension size, SpriteContent cnt)
protected void loadDefaults()
VGDLSpriteloadDefaults in class OrientedAvatarpublic void updateAvatar(Game game, boolean requestInput, boolean[] actionMask)
updateAvatar in class OrientedAvatargame - current state of the game.public void updateUse(Game game)
updateUse in class MovingAvatarprotected void shoot(Game game, int idx)
protected boolean hasAmmo(int idx)
protected void reduceAmmo(int idx)
public void postProcess()
VGDLSpritepostProcess in class MovingAvatarpublic VGDLSprite copy()
VGDLSpritecopy in class OrientedAvatarpublic void copyTo(VGDLSprite target)
VGDLSpritecopyTo in class OrientedAvatartarget - the sprite to copy to.public java.util.ArrayList<java.lang.String> getDependentSprites()
VGDLSpritegetDependentSprites in class VGDLSprite