kgoldrunner
kgrrunner.h
Go to the documentation of this file.
KGrHero(KGrLevelPlayer *pLevelPlayer, KGrLevelGrid *pGrid, int i, int j, int pSpriteId, KGrRuleBook *pRules)
The constructor of the KGrHero class.
Definition: kgrrunner.cpp:198
void setPrevInCell(const int prevEnemy)
Sets the ID of an enemy who already occupied the same cell (or -1).
Definition: kgrrunner.h:286
void soundSignal(const int n, const bool onOff=true)
Class to play, record and play back a level of a game.
Definition: kgrlevelplayer.h:65
Definition: kgrlevelgrid.h:27
KGrEnemy(KGrLevelPlayer *pLevelPlayer, KGrLevelGrid *pGrid, int i, int j, int pSpriteId, KGrRuleBook *pRules)
The constructor of the KGrEnemy class.
Definition: kgrrunner.cpp:354
Definition: kgrrunner.h:30
Definition: kgrrunner.h:30
Definition: kgrrulebook.h:30
HeroStatus run(const int scaledTime)
Makes the hero run, under control of a pointer or the keyboard and guided by the layout of the grid...
Definition: kgrrunner.cpp:214
int getPrevInCell()
Returns the ID of an enemy who already occupied the same cell (or -1).
Definition: kgrrunner.h:279
void startAnimation(const int spriteId, const bool repeating, const int i, const int j, const int time, const Direction dirn, const AnimationType type)
Requests the view-object to display an animation of a runner at a particular cell, cancelling and superseding any current animation.
int whereAreYou(int &x, int &y)
Returns the exact position of a runner (in grid-points or cell sub-divisions) and the number of grid-...
Definition: kgrrunner.h:68
void showState()
Implements the author's debugging aid that shows the hero's state.
Definition: kgrrunner.cpp:344
KGrRunner(KGrLevelPlayer *pLevelPlayer, KGrLevelGrid *pGrid, int i, int j, const int pSpriteId, KGrRuleBook *pRules, const int startDelay)
The constructor of the KGrRunner virtual class.
Definition: kgrrunner.cpp:27
Direction direction()
Returns the direction in which the enemy is running: used for avoiding collisions with other enemies...
Definition: kgrrunner.h:274
This class provides the shared features of all runners (hero and enemies).
Definition: kgrrunner.h:35
void setNuggets(const int nGold)
Tells the hero how many gold nuggets are remaining.
Definition: kgrrunner.h:207
Definition: kgrrunner.h:30
void incScore(const int n)
Requests the KGoldrunner game to add to the human player's score.
bool dig(const Direction dirn, int &digI, int &digJ)
Decides whether the hero can dig as is required by pressing a key or a mouse-button.
Definition: kgrrunner.cpp:305
bool setNextMovement(const char spriteType, const char cellType, Direction &dir, AnimationType &anim, int &interval)
Definition: kgrrunner.cpp:121
Definition: kgrrunner.h:30
void showState()
Implements the author's debugging aid that shows the enemy's state.
Definition: kgrrunner.cpp:610
void run(const int scaledTime)
Makes an enemy run, guided by the position of the hero and the layout of the grid.
Definition: kgrrunner.cpp:378
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.