• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

granatier

Public Member Functions | List of all members
Bonus Class Reference

#include <bonus.h>

Inheritance diagram for Bonus:
Inheritance graph
[legend]

Public Member Functions

 Bonus (qreal p_x, qreal p_y, Arena *p_arena, Granatier::Bonus::Type bonusType)
 
 ~Bonus ()
 
void doActionOnCollision (Player *p_player)
 
Granatier::Bonus::Type getBonusType () const
 
bool isDestroyed () const
 
bool isTaken () const
 
void setDestroyed ()
 
void setTaken ()
 
- Public Member Functions inherited from Element
 Element (qreal p_x, qreal p_y, Arena *p_arena)
 
 ~Element ()
 
QString getImageId () const
 
Granatier::Element::Type getType () const
 
qreal getX () const
 
qreal getY () const
 
void initCoordinate ()
 
void setArena (Arena *p_arena)
 
void setImageId (const QString &p_imageId)
 
void setInitialCoordinates (qreal p_x, qreal p_y)
 
void setX (qreal p_x)
 
void setY (qreal p_y)
 

Additional Inherited Members

- Signals inherited from Element
void moved (qreal p_x, qreal p_y)
 
- Protected Attributes inherited from Element
Arena * m_arena
 
QString m_imageId
 
Granatier::Element::Type m_type
 
qreal m_x
 
qreal m_xInit
 
qreal m_y
 
qreal m_yInit
 

Detailed Description

This class represents a Bonus for the Player.

Definition at line 29 of file bonus.h.

Constructor & Destructor Documentation

Bonus::Bonus ( qreal  p_x,
qreal  p_y,
Arena *  p_arena,
Granatier::Bonus::Type  bonusType 
)

Creates a new Bonus instance.

Parameters
p_xthe initial x-coordinate
p_ythe initial y-coordinate
p_arenaa reference to the Arena the Bonus will be on
bonusTypethe Bonus Type

Definition at line 24 of file bonus.cpp.

Bonus::~Bonus ( )

Deletes the Bonus instance.

Definition at line 32 of file bonus.cpp.

Member Function Documentation

void Bonus::doActionOnCollision ( Player *  p_player)
virtual

Computes an action on a collision with the Player.

Parameters
p_playerthe Player instance that collides with the Bonus

Reimplemented from Element.

Definition at line 37 of file bonus.cpp.

Granatier::Bonus::Type Bonus::getBonusType ( ) const

Definition at line 42 of file bonus.cpp.

bool Bonus::isDestroyed ( ) const

Definition at line 63 of file bonus.cpp.

bool Bonus::isTaken ( ) const

Definition at line 52 of file bonus.cpp.

void Bonus::setDestroyed ( )

Definition at line 57 of file bonus.cpp.

void Bonus::setTaken ( )

Definition at line 47 of file bonus.cpp.


The documentation for this class was generated from the following files:
  • bonus.h
  • bonus.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

granatier

Skip menu "granatier"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal