FYP  1.0.0
Final Year Project -- Alexander Meuer
abilities::Heal Class Reference
Inheritance diagram for abilities::Heal:
Inheritance graph
Collaboration diagram for abilities::Heal:
Collaboration graph

Public Member Functions

 Heal (tinyxml2::XMLElement *xml)
 
- Public Member Functions inherited from Ability
 Ability (tinyxml2::XMLElement *xml)
 Constructs an Ability from xml. Only description is read from xml in this base class, derived classes will require more. More...
 
virtual void execute (Pawn *user)
 Calls doExecuteLogic() if ability has fully cooled since last use. More...
 
void update (sf::Time const &elapsedTime)
 Checks if ability is active and does update logic if it is. More...
 
const std::string & getDescription () const
 Gets a user-friendly description of the ability, as it might appear in a tooltip, etc. More...
 
const std::string & getName () const
 Gets the user-friendly name of the ability. More...
 
bool canCast () const
 
float getRemainingCooldown () const
 Gets the remaining time, in seconds, before the ability can be used again.
 
float getTotalCooldown () const
 The time, in seconds, that the ability's cooldown lasts.
 
sf::Time const & getCastDuration () const
 
bool isActive () const
 Gets whether the ability has been activated or not. More...
 
void setPawnList (std::shared_ptr< const std::list< std::shared_ptr< Pawn >>> const &list)
 Sets the pawn list to be used when the Ability wishes to find pawns in the game. The pawn list cannot be used for directly adding Pawns to the game. More...
 
void setProjectileManager (std::shared_ptr< ProjectileManager > const &manager)
 Sets the ProjectileManager to be used when the Ability wishes to add projectiles to the game. More...
 
void setSpawnCallback (std::function< void(std::shared_ptr< Minion >)> const &callback)
 Sets the callback used for adding units to the game. Adding a unit to the pawn list won't add flocking or collision, so we've a callback that will. More...
 
bool checkHotkey (char key) const
 
char getHotkey () const
 
void setHotkey (char hotkey)
 

Protected Member Functions

void doExecuteLogic (Pawn *user) override
 
void doUpdateLogic (sf::Time const &deltaTime) override
 Does everything necessary to update the ability. Only called if the ability is active.
 
void doDraw (sf::RenderTarget &target, sf::RenderStates states) const override
 
- Protected Member Functions inherited from Ability
void activate ()
 
void deactivate ()
 
void draw (sf::RenderTarget &target, sf::RenderStates states) const override final
 Calls doDraw() if ability is active.
 
void spawnMinion (std::shared_ptr< Minion > const &pawn) const
 Adds a Pawn to the game. More...
 
void spawnProjectile (std::shared_ptr< Projectile > const &projectile) const
 Adds a projectile to the game. More...
 

Private Attributes

Actor mCastGraphics
 
const int mHealAmount
 
thor::ParticleSystem mParticleSystem
 
thor::UniversalEmitter mEmitter
 

Member Function Documentation

void abilities::Heal::doExecuteLogic ( Pawn user)
overrideprotectedvirtual
Parameters
userPointer to the pawn that used the ability.

Implements Ability.


The documentation for this class was generated from the following file: