34 virtual void Update(
const GameTime *pGameTime);
38 virtual void Draw(SpriteBatch *pSpriteBatch) = 0;
50 virtual std::string
ToString()
const {
return "Player Ship"; }
64 virtual void ConfineToScreen(
const bool isConfined =
true) { m_isConfinedToScreen = isConfined; }
93 Vector2 m_desiredDirection;
96 float m_responsiveness;
98 bool m_isConfinedToScreen;
100 uint8_t m_playerIndex;
virtual void Update(const GameTime *pGameTime)
Called when the game determines it is time to draw a frame.
virtual uint8_t GetPlayerIndex() const
Gets the index of the player that controls the ship.
Definition: PlayerShip.h:72
virtual void SetPlayerIndex(const uint8_t index)
Sets the index of the player that controls the ship.
Definition: PlayerShip.h:68
virtual void SetResponsiveness(const float responsiveness)
Set the responsiveness of the player ship.
Definition: PlayerShip.cpp:100
Shooter Library is a library of classes, interfaces, and value types that provides a foundation for d...
Definition: Background.h:16
virtual Vector2 GetDesiredDirection() const
Get the desired player direction.
Definition: PlayerShip.h:88
virtual CollisionType GetCollisionType() const
Gets the collision type mask.
Definition: PlayerShip.h:60
virtual Vector2 GetHalfDimensions() const =0
Gets the half dimensions of the game object.
virtual void SetDesiredDirection(const Vector2 direction)
Set the desired player direction.
Definition: PlayerShip.h:46
static const CollisionType SHIP
Represents a ship.
Definition: CollisionType.h:33
PlayerShip(const uint8_t playerIndex)
Instantiate a player ship object.
Definition: PlayerShip.cpp:19
virtual void ConfineToScreen(const bool isConfined=true)
Confines the player ship to the screen.
Definition: PlayerShip.h:64
Base class for player ships.
Definition: PlayerShip.h:20
virtual void Draw(SpriteBatch *pSpriteBatch)=0
Called when the game determines it is time to draw a frame.
virtual float GetResponsiveness() const
Get the responsiveness of the player ship.
Definition: PlayerShip.h:84
virtual void HandleInput(const InputState *pInput)
Called when the game has determined that player input needs to be processed.
static const CollisionType PLAYER
Represents a player.
Definition: CollisionType.h:30
virtual std::string ToString() const
Gets a string representation of the player ship.
Definition: PlayerShip.h:50
Base class for all ships.
Definition: Ship.h:22
Defines the types of game objects that can collide with each other.
Definition: CollisionType.h:20