public class Controllable extends MovableEntity
GAME_DIAGLENGTH, GAME_DIAGLENGTH2, GAME_EDGELENGTH, GAME_EDGELENGTH2, 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) |
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.
|
clone, damage, dispose, getFriction, getMana, getMovement, getSpeed, heal, isColiding, isCollectable, isFloating, isIndestructible, isInLiquid, isOnGround, jump, onCollide, render, setColiding, setCollectable, setDamageSounds, setFallingSound, setFloating, setFriction, setIndestructible, setJumpingSound, setLandingSound, setMana, setMovement, setPosition, setRunningSound, setSpeed, setWaterSound, spawn, update
getCategory, getDimensionZ, getName, getPosition, render, save, setDimensionZ, setHeight, shouldBeDisposed, spawned
getDrawCalls, getHealth, getId, getLightlevel, getPixmap, getRotation, getSprite, getSpriteId, getSprites, getSpritesheet, getValue, increaseDrawCalls, isHidden, isObstacle, isTransparent, loadSheet, render, render, render, render, render, render, resetDrawCalls, setGraphicsId, setHealth, setHidden, setLightlevel, setObstacle, setRotation, setTransparent, setValue, staticDispose, updateStaticUpdates
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()
MovableEntity
jump
in class MovableEntity
MovableEntity.jump(float)
public com.badlogic.gdx.math.Vector3 getAiming()
MovableEntity
getAiming
in class MovableEntity