Arkanoid Remake  1.0
Public Member Functions | List of all members
Ship Class Reference

Game ship object definition. More...

#include <Ship.h>

Inheritance diagram for Ship:
DynObj BoxObj

Public Member Functions

void DragBall (Ball &ball)
 Drag a ball (when held by this ship)
 
void LaunchBall (Ball &ball)
 Launch a ball (when held by this ship)
 
- Public Member Functions inherited from DynObj
 DynObj ()
 Default constructor.
 
 DynObj (const DynObj &obj)
 Copy contructor.
 
void SetVel (double x, double y)
 Set the velocity along the axes.
 
void SetVelX (double x)
 Set the velocity along the X axis.
 
void SetVelY (double y)
 Set the velocity along the Y axis.
 
const VecXyVel () const
 Get the velocity vector.
 
const double VelX () const
 Get the velocity component along the X axis.
 
const double VelY () const
 Get the velocity component along the Y axis.
 
void InvertVelX ()
 Invert the velocity component along the X axis.
 
void InvertVelY ()
 Invert the velocity component along the Y axis.
 
const double Speed () const
 Get the speed (recalculate it if needed)
 
const double SquareSpeed () const
 Get the square speed (recalculate it if needed)
 
void Move (double delta_time)
 Move according to the velocity.
 
void Stop ()
 Stop: reset the velocity.
 
const VecXyPrevPos () const
 
VecXyPrevPos ()
 
- Public Member Functions inherited from BoxObj
 BoxObj (double x=0.0, double y=0.0)
 Default constructor with optional intialization list.
 
 BoxObj (const BoxObj &obj)
 
VecXyPos ()
 Position.
 
const VecXyPos () const
 Position (read only)
 
VecXyOrigin ()
 Origin (min x,y corner)
 
const VecXyOrigin () const
 Origin (min x,y corner, read-only)
 
VecXySize ()
 Size.
 
const VecXySize () const
 Size (read only)
 
const double MinX () const
 Lower X value.
 
const double MinY () const
 Lower Y value.
 
const double MaxX () const
 Upper X value.
 
const double MaxY () const
 Upper X value.
 
const VecXy HSize () const
 Half size.
 
const double HSizeX () const
 Half size along X axis.
 
const double HSizeY () const
 Half size along Y axis.
 

Additional Inherited Members

- Protected Member Functions inherited from DynObj
void UpdateSpeed () const
 Update the scala speed values based on the velocity.
 
- Protected Attributes inherited from DynObj
VecXy mVel
 
VecXy mPrevPos
 
- Protected Attributes inherited from BoxObj
VecXy mPos
 
VecXy mSize
 
VecXy mOrigin
 

Detailed Description

Game ship object definition.

The Ship class implements the specific behaviour of a specialized dynamic object, thus it is derived from the DynObj class.


The documentation for this class was generated from the following file: