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 voidcleanUp()Cleans up hanging data partsintgetAmmo()FactiongetFaction()Added for Assessment 2voidupdate()Is run once per frame-
Methods inherited from class com.mygdx.game.Entitys.Ship
BeginContact, EndContact, EnterTrigger, ExitTrigger, getAttackRange, getHealth, getPlunder, getPoints, getPosition, getValue, isAlive, plunder, points, resetToDefault, setFaction, setShipDirection, setShipDirection, shoot, shoot
-
Methods inherited from class com.mygdx.game.Entitys.Entity
addComponent, addComponents, dispose, getComponent, getComponent, getName, raiseEvents, setName
-
-
-
-
Method Detail
-
getAmmo
public int getAmmo()
- Returns:
- the amount of ammo available to the player
-
getFaction
public Faction getFaction()
Added for Assessment 2- Overrides:
getFactionin classShip- Returns:
- the Faction attached to the pirate component of this object
-
-