public class PlayerWithWeapon extends Controllable
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 |
---|
PlayerWithWeapon(int spritesPerDir,
int height)
Creates a player.
|
Modifier and Type | Method and Description |
---|---|
void |
equipWeapon(int id)
Gives the player a weapon.
|
com.badlogic.gdx.math.Vector3 |
getAiming()
Getting aim relative to middle of view by reading mouse position.
|
Camera |
getCamera() |
Weapon |
getWeapon() |
void |
jump()
Jumps the player
|
void |
setCamera(Camera camera)
Set the camera which is renderin the player to calculate the aiming.
|
void |
update(float delta)
Updates the character.
|
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
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 PlayerWithWeapon(int spritesPerDir, int height)
Block.getInstance(int)
public void jump()
jump
in class Controllable
MovableEntity.jump(float)
public com.badlogic.gdx.math.Vector3 getAiming()
getAiming
in class Controllable
public void update(float delta)
MovableEntity
update
in class MovableEntity
delta
- time since last update in mspublic void setCamera(Camera camera)
camera
- public Camera getCamera()
public Weapon getWeapon()
public void equipWeapon(int id)
id
-