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

kapman

Public Member Functions | Static Public Attributes | List of all members
Energizer Class Reference

#include <energizer.h>

Inheritance diagram for Energizer:
Inheritance graph
[legend]

Public Member Functions

 Energizer (qreal p_x, qreal p_y, Maze *p_maze, const QString &p_imageId)
 
 ~Energizer ()
 
void doActionOnCollision (Kapman *p_kapman)
 
QString getType ()
 
- Public Member Functions inherited from Element
 Element (qreal p_x, qreal p_y, Maze *p_maze)
 
 ~Element ()
 
QString getImageId () const
 
int getPoints () const
 
Element::Type getType () const
 
qreal getX () const
 
qreal getY () const
 
void initCoordinate ()
 
void setImageId (const QString &p_imageId)
 
void setX (qreal p_x)
 
void setY (qreal p_y)
 

Static Public Attributes

static const int POINTS = 50
 

Additional Inherited Members

- Public Types inherited from Element
enum  Type {
  KAPMAN = 0, GHOST = 1, PILL = 2, ENERGYZER = 3,
  BONUS = 4
}
 
- Signals inherited from Element
void moved (qreal p_x, qreal p_y)
 
- Protected Attributes inherited from Element
QString m_imageId
 
Maze * m_maze
 
int m_points
 
Type m_type
 
qreal m_x
 
qreal m_xInit
 
qreal m_y
 
qreal m_yInit
 

Detailed Description

This class represents an energizer enabling to eat Ghosts.

Definition at line 29 of file energizer.h.

Constructor & Destructor Documentation

Energizer::Energizer ( qreal  p_x,
qreal  p_y,
Maze *  p_maze,
const QString &  p_imageId 
)

Creates a new Energizer instance.

Parameters
p_xthe x-coordinate
p_ythe y-coordinate
p_mazethe Maze the Energyzer is on
p_imageIdthe path to the Energyzer image

Definition at line 25 of file energizer.cpp.

Energizer::~Energizer ( )

Deletes the Energizer instance.

Definition at line 31 of file energizer.cpp.

Member Function Documentation

void Energizer::doActionOnCollision ( Kapman *  p_kapman)
virtual

Computes an action on a collision with the Kapman.

Parameters
p_kapmanthe instance of Kapman which collides with the Energyzer

Reimplemented from Element.

Definition at line 34 of file energizer.cpp.

QString Energizer::getType ( )

Gets the type of the Energyzer.

Returns
the type of the Energyzer

Member Data Documentation

const int Energizer::POINTS = 50
static

The value of an Energyzer.

Definition at line 36 of file energizer.h.


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

KDE's Doxygen guidelines are available online.

kapman

Skip menu "kapman"
  • Main Page
  • 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