- Main Page
- Classes
- Files

- File List
- File Members

# C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/BreakoutBall.h

Go to the documentation of this file.

    00001 #ifndef _BREAKOUTBALL_H_
    00002 #define _BREAKOUTBALL_H_
    00003
    00004 #include "Vector2.h"
    00005 #include "AABB.h"
    00006 #include "Visualisation.h"
    00007
    00008 class BreakoutBox;
    00009 class BreakoutPaddle;
    00010 class BreakoutWorldBoundaries;
    00011
    00012 class BreakoutBall
    00013 {
    00014         public:
    00015         BreakoutBall(const int &radius, const ColourRGB &innerColour, const ColourRGB &outerColour);
    00016         ~BreakoutBall();
    00017
    00018         void Draw();
    00019         void Update();
    00020         bool HandleCollisionWithBox(BreakoutBox* pBox);
    00021         bool HandleCollisionWithPaddle(BreakoutPaddle* pPaddle);
    00022         bool HandleCollisionWithWorldBoundaries(BreakoutWorldBoundaries* pBounds);
    00023
    00024         Vector2i GetPosition()                                   { return m_position; }
    00025         void    SetPosition(const Vector2i &pos)  { m_position = m_previousPosition = pos; }
    00026         Vector2i GetVelocity()                                   { return m_velocity; }
    00027         void    SetVelocity(const Vector2i &vel)  { m_velocity = vel; }
    00028         int             GetRadius()                                              { return m_radius; }
    00029         void    SetRadius(const int &radius)     { m_radius = radius; }
    00030
    00031         protected:
    00032 //      void GetBoxSide(const Vector2 &pointOnBox, AABB* pBox, Vector2 &ptA, Vector2 &ptB, bool &isXAxis);
    00033
    00034         Vector2i m_position, m_previousPosition, m_velocity;
    00035         int m_radius;
    00036         SpriteID m_spriteID;
    00037 };
    00038
    00039 #endif