granatier
character.cpp
Go to the documentation of this file.
23 Character::Character(qreal p_x, qreal p_y, Arena* p_arena) : Element(p_x, p_y, p_arena), m_xSpeed(0), m_ySpeed(0)
Definition: granatierglobals.h:74
This class describes the common characteristics and behaviour of the game characters (Players)...
Definition: character.h:31
Character(qreal p_x, qreal p_y, Arena *p_arena)
Creates a new Character instance.
Definition: character.cpp:23
bool isInLineSight(Character *p_character) const
Checks the Character is in the line of sight of the given other Character.
Definition: character.cpp:100
void move()
Moves the Character function of its current coordinates and speed.
Definition: character.cpp:33
void initSpeed()
Initializes the Character speed considering the difficulty level.
Definition: character.cpp:93
This class describes the common characteristics and behaviour of any game Element (character or item)...
Definition: element.h:32
int getColFromX(const qreal p_x) const
Gets the column index corresponding to the given x-coordinate.
Definition: arena.cpp:154
qreal m_normalSpeed
Reference to the speed of the character when in "normal" behaviour.
Definition: character.h:60
Cell getCell(const int p_row, const int p_column) const
Gets the Cell at the given coordinates.
Definition: arena.cpp:120
int getRowFromY(const qreal p_y) const
Gets the row index corresponding to the given y-coordinate.
Definition: arena.cpp:144
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:10 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:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.