public class AlternateChaser extends RandomNPC
| Modifier and Type | Field and Description |
|---|---|
boolean |
fleeing |
int |
itype1 |
int |
itype2 |
java.lang.String |
stype1 |
java.lang.String |
stype2 |
bucket, bucketSharp, color, cooldown, draw_arrow, image, img, invisible, is_avatar, is_from_avatar, is_npc, is_oriented, is_resource, is_static, is_stochastic, itypes, lastmove, lastrect, mass, name, only_active, orientation, physics, physicstype, physicstype_id, portal, rect, resources, shrinkfactor, singleton, speed, spriteID, strength| Constructor and Description |
|---|
AlternateChaser() |
AlternateChaser(Vector2d position,
java.awt.Dimension size,
SpriteContent cnt) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closestTargets(Game game)
Sets a list with the closest targets (sprites with the type 'stype'), by distance
|
VGDLSprite |
copy()
Creates a copy of this sprite.
|
void |
copyTo(VGDLSprite target)
Copies the attributes of this object to the one passed as parameter.
|
protected void |
loadDefaults()
Loads the default values for this sprite.
|
protected void |
movesToward(VGDLSprite target) |
void |
postProcess()
Method to perform post processing when the sprite has received its parameters.
|
void |
update(Game game)
Updates this sprite, performing the movements and actions for the next step.
|
_draw, _drawImage, _drawOriented, _drawResources, _updatePos, _velocity, applyMovement, draw, getAmountResource, getPosition, getType, init, lastDirection, loadImage, modifyResource, parseParameters, setFromAvatar, setRect, setRect, toString, updatePassivepublic boolean fleeing
public java.lang.String stype1
public java.lang.String stype2
public int itype1
public int itype2
public AlternateChaser()
public AlternateChaser(Vector2d position, java.awt.Dimension size, SpriteContent cnt)
protected void loadDefaults()
VGDLSpriteloadDefaults in class RandomNPCpublic void postProcess()
VGDLSpritepostProcess in class VGDLSpritepublic void update(Game game)
VGDLSpriteprotected void movesToward(VGDLSprite target)
protected void closestTargets(Game game)
game - game to access all spritespublic VGDLSprite copy()
VGDLSpritepublic void copyTo(VGDLSprite target)
VGDLSprite