Paddle Class Reference

The user controlled paddle. More...

#include <Game/Paddle.h>

Inherits PhysicsObject.

Inherited by DefaultPaddle.

List of all members.

Public Member Functions

void SetImage (const char *file)
 Sets the image to use for the paddle.
void SetStickyImage (const char *file)
 Sets the image to use for the paddle when the paddle is in sticky mode.
void SetWidth (float w)
 Sets the width of the paddle.
float GetHeight () const
 Gets the height of the paddle.
virtual void Grow ()=0
 Grows the size of the paddle.
virtual void Shrink ()=0
 Shrinks the size of the paddle.
void AddAttachment (const Point2f &pos, const Sprite &att)
 Attaches an sprite to the paddle.
void SetSticky (bool s)
 Sets the paddles sticky mode.
bool IsSticky () const
 Gets the state of the sticky mode.
bool IsBallAttached (const PhysicsObject *b) const
 Determines if a ball is attached to the paddle.
virtual void Reset ()
 Resets the paddle to its default state.

Protected Member Functions

virtual void OnAttachBall ()
 Called when a ball is attched to the paddle.
virtual void OnDetachBall ()
 Called when a ball is detached from the paddle.

Detailed Description

The user controlled paddle.


Member Function Documentation

void Paddle::AddAttachment ( const Point2f pos,
const Sprite att 
)

Attaches an sprite to the paddle.

Parameters:
[in] pos the position to place the attachment relative to the center of the paddle.
[in] att the attachment.
float Paddle::GetHeight (  )  const

Gets the height of the paddle.

Returns:
the height.
bool Paddle::IsBallAttached ( const PhysicsObject *  b  )  const [inline]

Determines if a ball is attached to the paddle.

Parameters:
[in] b the ball to check for.
Returns:
true if the given ball is attached to to paddle, false otherwise.
bool Paddle::IsSticky (  )  const [inline]

Gets the state of the sticky mode.

Returns:
True if the paddle is sticky, false otherwise.
void Paddle::SetImage ( const char *  file  ) 

Sets the image to use for the paddle.

Parameters:
[in] file the name of the image file.
void Paddle::SetSticky ( bool  s  ) 

Sets the paddles sticky mode.

Parameters:
[in] s the state of the sticky mode.
void Paddle::SetStickyImage ( const char *  file  ) 

Sets the image to use for the paddle when the paddle is in sticky mode.

Parameters:
[in] file the name of the image file.
void Paddle::SetWidth ( float  w  ) 

Sets the width of the paddle.

Parameters:
[in] w the width.

The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:06 2010 for BrickOut |ReDuX| by  doxygen 1.6.3