public class Controllable extends AbstractMovableEntity
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
Constructor and Description |
---|
Controllable(int id,
int spritesPerDir,
Point point) |
Modifier and Type | Method and Description |
---|---|
com.badlogic.gdx.math.Vector3 |
getAiming()
Defines the direction of the gun - if no gun available - the direction of the head.
|
void |
jump()
This method should define what happens when the object jumps.
|
void |
walk(boolean up,
boolean down,
boolean left,
boolean right,
float walkingspeed)
Lets the player walk.
|
damage, dispose, getHealt, getMana, getMovement, getSpeed, isColiding, isFloating, isInLiquid, jump, onGround, setColiding, setDamageSounds, setFallingSound, setFloating, setFriction, setJumpingSound, setLandingSound, setMana, setMovement, setRunningSound, setSpeed, setWaterSound, update
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
public Controllable(int id, int spritesPerDir, Point point)
public void walk(boolean up, boolean down, boolean left, boolean right, float walkingspeed)
up
- move up?down
- move down?left
- move left?right
- move right?walkingspeed
- the higher the speed the bigger the steps. Should be in m/s.public void jump()
AbstractMovableEntity
jump
in class AbstractMovableEntity
AbstractMovableEntity.jump(float)
public com.badlogic.gdx.math.Vector3 getAiming()
AbstractMovableEntity
getAiming
in class AbstractMovableEntity