public class PlayerWithWeapon extends Controllable
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 |
---|
PlayerWithWeapon(Point point)
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.
|
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
damage, dispose, getHealt, getMana, getMovement, getSpeed, isColiding, isFloating, isInLiquid, jump, onGround, setColiding, setDamageSounds, setFallingSound, setFloating, setFriction, setJumpingSound, setLandingSound, setMana, setMovement, setRunningSound, setSpeed, setWaterSound
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 PlayerWithWeapon(Point point)
point
- the position of the playerBlock.getInstance(int)
public void jump()
jump
in class Controllable
AbstractMovableEntity.jump(float)
public com.badlogic.gdx.math.Vector3 getAiming()
getAiming
in class Controllable
public void update(float delta)
AbstractMovableEntity
update
in class AbstractMovableEntity
delta
- time since last update in mspublic void setCamera(Camera camera)
camera
- public Weapon getWeapon()
public void equipWeapon(int id)
id
-