public class PlayerWithWeapon extends Controllable
GAME_DIAGLENGTH, GAME_DIAGLENGTH2, GAME_EDGELENGTH, GAME_EDGELENGTH2, OBJECTTYPESNUM, VALUESNUM, VIEW_DEPTH, VIEW_DEPTH2, VIEW_DEPTH4, VIEW_HEIGHT, VIEW_HEIGHT2, VIEW_HEIGHT4, VIEW_WIDTH, VIEW_WIDTH2, VIEW_WIDTH4, ZAXISSHORTENING
Constructor and Description |
---|
PlayerWithWeapon(int spritesPerDir,
int height)
Creates a player.
|
Modifier and Type | Method and Description |
---|---|
void |
equipWeapon(byte 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 with a sound
|
void |
setCamera(Camera camera)
Set the camera which is renderin the player to calculate the aiming.
|
void |
update(float dt)
Updates the character.
|
walk
addMovement, addMovement, addToHor, clone, damage, getFriction, getLandingSound, getMana, getMovement, getMovementHor, getOrientation, getSpeed, getSpeedHor, heal, isColiding, isFloating, isIndestructible, isInLiquid, isOnGround, jump, onCollide, onLand, render, setColiding, setDamageSounds, setFallingSound, setFloating, setFriction, setHorMovement, setIndestructible, setJumpingSound, setLandingSound, setMana, setMovement, setMovement, setOrientation, setRunningSound, setSpeedHorizontal, setSpeedIncludingZ, setStepSound1Grass, setWalkingAnimationCycling, setWalkingSpeedIndependentAnimation, setWalkingStepMode, setWaterSound, step
disableShadow, dispose, disposeFromMap, enableShadow, getAnimation, getCategory, getDimensionZ, getName, getPosition, getRegisteredEntities, isGettingSaved, isInMemoryArea, isObstacle, isTransparent, registerEngineEntities, registerEntity, setAnimation, setDimensionZ, setHeight, setName, setObstacle, setPosition, setSaveToDisk, setTransparent, shouldBeDisposed, shouldBeDisposedFromMap, spawn, spawned
getAtlasRegion, getColor, getCoreData, getDepth, getDrawCalls, getHealth, getId, getLightlevel, getPixmap, getRotation, getScaling, getSprite, getSpriteId, getSprites, getSpritesheet, getSpritesheetPath, getTextureDiffuse, getTextureNormal, getValue, increaseDrawCalls, isHidden, loadSheet, render, render, render, resetDrawCalls, setColor, setCustomSpritesheet, setGraphicsId, setHealth, setHidden, setLightlevel, setRotation, setScaling, setValue, staticDispose
public PlayerWithWeapon(int spritesPerDir, int height)
spritesPerDir
- height
- public void jump()
jump
in class Controllable
MovableEntity.jump(float, boolean)
public com.badlogic.gdx.math.Vector3 getAiming()
getAiming
in class MovableEntity
public void update(float dt)
MovableEntity
update
in class MovableEntity
dt
- time since last update in mspublic void setCamera(Camera camera)
camera
- public Camera getCamera()
public Weapon getWeapon()
public void equipWeapon(byte id)
id
-