48 virtual std::string
ToString()
const {
return "Player Ship"; }
56 virtual void ConfineToScreen(
const bool isConfined =
true) { m_isConfinedToScreen = isConfined; }
79 float m_responsiveness = 0;
81 bool m_isConfinedToScreen =
false;
Represents a type of collision.
static const CollisionType Ship
static const CollisionType Player
Contains timing values for game updates and rendering.
Loads and manages the lifespan of objects from external files.
Enables a group of sprites to be drawn using the same settings.
Represents a 2D grid of texels.
Defines a vector with 2 components (x and y).
void Set(const float x, const float y)
Sets the components of the vector.
Represents a level in the game.
Represents the player's ship.
virtual void ConfineToScreen(const bool isConfined=true)
Prevents the player ship from moving off the screen.
virtual void HandleInput(const InputState &input)
Handles input for the player ship.
virtual void SetResponsiveness(const float responsiveness)
Sets the responsiveness of the player ship.
virtual CollisionType GetCollisionType() const
Gets the collision type of the player ship.
PlayerShip()
Creates a new instance of PlayerShip.
virtual Vector2 GetHalfDimensions() const
Gets the half dimensions of the player ship.
virtual std::string ToString() const
Gets the string representation of the player ship.
virtual float GetResponsiveness() const
Gets the responsiveness of the player ship.
virtual void LoadContent(ResourceManager &resourceManager)
Loads the content for the player ship.
virtual void Draw(SpriteBatch &spriteBatch)
Draws the player ship.
virtual Vector2 GetDesiredDirection() const
Gets the desired direction of the player ship.
virtual void SetDesiredDirection(const Vector2 direction)
Sets the desired direction of the player ship, based on input.
virtual void Update(const GameTime &gameTime)
Updates the player ship.
Represents a ship in the game.
virtual void Initialize()
Initializes the ship.