Package com.mygdx.game.Entitys
Class Player
- java.lang.Object
-
- com.mygdx.game.Entitys.Entity
-
- com.mygdx.game.Entitys.Ship
-
- com.mygdx.game.Entitys.Player
-
- All Implemented Interfaces:
CollisionCallBack
public class Player extends Ship
Player's ship entity.
-
-
Field Summary
-
Fields inherited from class com.mygdx.game.Entitys.Ship
shipDirections
-
-
Constructor Summary
Constructors Constructor Description Player()
Adds ship with PlayerController component, loading its speed from GameManager settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPlunder(int money)
void
cleanUp()
Similar to the Component's cleanUp eventint
getAmmo()
int
getHealth()
void
setSpeed(float newSpeed)
-
Methods inherited from class com.mygdx.game.Entitys.Ship
BeginContact, EndContact, EnterTrigger, ExitTrigger, getAttackRange, getFaction, getPlunder, getPosition, isAlive, plunder, setFaction, setPosition, setShipDirection, setShipDirection, shoot, shoot
-
Methods inherited from class com.mygdx.game.Entitys.Entity
addComponent, addComponents, getComponent, getComponent, getName, raiseEvents, setName, update
-
-
-
-
Method Detail
-
setSpeed
public void setSpeed(float newSpeed)
-
addPlunder
public void addPlunder(int money)
-
cleanUp
public void cleanUp()
Description copied from class:Entity
Similar to the Component's cleanUp event
-
getAmmo
public int getAmmo()
-
-