public abstract class AbstractMovableEntity extends AbstractEntity
#walk(boolean, boolean, boolean, boolean, float)
".GAME_DIAGLENGTH, GAME_DIAGLENGTH2, GAME_EDGELENGTH, OBJECTTYPESNUM, SCREEN_DEPTH, SCREEN_DEPTH2, SCREEN_DEPTH4, SCREEN_HEIGHT, SCREEN_HEIGHT2, SCREEN_HEIGHT4, SCREEN_WIDTH, SCREEN_WIDTH2, SCREEN_WIDTH4, VALUESNUM
Modifier | Constructor and Description |
---|---|
protected |
AbstractMovableEntity(int id,
int spritesPerDir,
Point point)
Constructor of AbstractCharacter.
|
Modifier and Type | Method and Description |
---|---|
void |
damage(int value) |
void |
dispose()
Deletes the object from the map.
|
com.badlogic.gdx.math.Vector3 |
getAiming()
Defines the direction of the gun - if no gun available - the direction of the head.
|
int |
getHealt() |
int |
getMana() |
com.badlogic.gdx.math.Vector3 |
getMovement() |
float |
getSpeed() |
boolean |
isColiding() |
boolean |
isFloating()
Is the object be affected by gravity?
|
boolean |
isInLiquid()
Is the character standing in a liquid?
|
abstract void |
jump()
This method should define what happens when the object jumps.
|
void |
jump(float velo)
Jump with a specific speed
|
boolean |
onGround()
Adds horizontal colission check to onGround().
|
void |
setColiding(boolean coliding) |
void |
setDamageSounds(com.badlogic.gdx.audio.Sound[] sound) |
void |
setFallingSound(com.badlogic.gdx.audio.Sound fallingSound)
Sets the sound to be played when falling.
|
void |
setFloating(boolean floating)
Should the object be affected by gravity?
|
void |
setFriction(int friction) |
void |
setJumpingSound(com.badlogic.gdx.audio.Sound jumpingSound)
Set the value of jumpingSound
|
void |
setLandingSound(com.badlogic.gdx.audio.Sound landingSound)
Set sound played when the character lands on the feet.
|
void |
setMana(int mana) |
void |
setMovement(com.badlogic.gdx.math.Vector3 movement) |
void |
setRunningSound(com.badlogic.gdx.audio.Sound runningSound)
Set the sound to be played when running.
|
void |
setSpeed(float speed) |
static void |
setWaterSound(com.badlogic.gdx.audio.Sound waterSound)
Set the value of waterSound
|
void |
update(float delta)
Updates the character.
|
exist, existing, getCategory, getDimensionZ, getName, getPosition, render, setDimensionZ, setHeight, setPosition, shouldBeDisposed
getDrawCalls, getId, getLightlevel, getPixmap, getRotation, getSprite, getSprites, getSpritesheet, getValue, increaseDrawCalls, isClipped, isHidden, isObstacle, isTransparent, loadSheet, prepareColor, render, render, render, render, render, render, render, resetDrawCalls, setClipped, setHidden, setLightlevel, setObstacle, setRotation, setTransparent, setValue, staticDispose, updateStaticUpdates
protected AbstractMovableEntity(int id, int spritesPerDir, Point point)
id
- spritesPerDir
- The number of animation sprites per walking direction. if 0 then it only uses the value 0point
- public abstract void jump()
jump(float)
public void jump(float velo)
velo
- the velocity in m/spublic com.badlogic.gdx.math.Vector3 getAiming()
public void update(float delta)
update
in class AbstractGameObject
delta
- time since last update in mspublic void setFallingSound(com.badlogic.gdx.audio.Sound fallingSound)
fallingSound
- public void setRunningSound(com.badlogic.gdx.audio.Sound runningSound)
runningSound
- public void setJumpingSound(com.badlogic.gdx.audio.Sound jumpingSound)
jumpingSound
- new value of jumpingSoundpublic void setLandingSound(com.badlogic.gdx.audio.Sound landingSound)
landingSound
- new value of landingSoundpublic static void setWaterSound(com.badlogic.gdx.audio.Sound waterSound)
waterSound
- new value of waterSoundpublic void setDamageSounds(com.badlogic.gdx.audio.Sound[] sound)
sound
- public com.badlogic.gdx.math.Vector3 getMovement()
public void setMovement(com.badlogic.gdx.math.Vector3 movement)
public float getSpeed()
public void setSpeed(float speed)
public boolean isColiding()
public void setColiding(boolean coliding)
public boolean isFloating()
public void setFloating(boolean floating)
floating
- public boolean onGround()
onGround
in class AbstractEntity
public boolean isInLiquid()
public void damage(int value)
value
- public int getHealt()
public int getMana()
public void setMana(int mana)
mana
- public void setFriction(int friction)
public void dispose()
AbstractEntity
dispose
in class AbstractEntity