![]() |
FYP
1.0.0
Final Year Project -- Alexander Meuer
|
Playable level of the game. More...
#include <Level.hpp>


Public Member Functions | |
| Level (XMLElement *root) | |
| bool | handleEvent (sf::Event &Event) override |
| void | update (sf::Time const &elapsedTime) override |
| void | draw (sf::RenderWindow &w) override |
| void | cleanup () override |
Private Member Functions | |
| void | drawToUnderlay (sf::Drawable const &drawable) |
| Draws an object to the underlay texture. | |
| void | onPawnDeath (Pawn *pawn) |
| void | autofireProjectile (shared_ptr< Projectile > const &projectile) const |
| Used to handle unfired projectile that are given to the projectile manager. Fires the projectile at the nearest enemy pawn. More... | |
| void | setupAbilities () |
| Initializes abilities and their buttons. | |
| void | setupTowerButtons () |
| void | spawnMinion (shared_ptr< Minion > const &unit, bool setPath=true, bool addFlock=true, bool addCollision=true) |
| void | processPauseMenuResult () |
| void | processFailDialogueResult () |
| void | processCompletionDialogueResult () |
| bool | updatePawns (sf::Time const &elapsedTime) |
| void | updateTowers (sf::Time const &elapsedTime) |
| Calls update and shoot on all towers. | |
| void | ensureMusicPlaying () |
| Plays the background music if it is not playing. | |
| void | cleanPawnFlock () const |
| Removes expired weak_ptrs from the list. | |
Static Private Member Functions | |
| static bool | compareDepth (shared_ptr< Actor > const &A, shared_ptr< Actor > const &B) |
| Compares the y position of two actors for the purpose of sorting the draw order. | |
Private Attributes | |
| gui::DialogueBox | mPauseDialogue |
| gui::DialogueBox | mCompleteDialogue |
| gui::DialogueBox | mFailDialogue |
| std::list< std::pair< gui::AbilityButton, shared_ptr< Ability > > > | mAbilityList |
| std::map< TowerPlacer::TowerType, std::unique_ptr< gui::CostButton > > | mTowerButtons |
| shared_ptr< Pawn > | mHero |
| shared_ptr< std::list< shared_ptr< Pawn > > > | mPawns |
| shared_ptr< collision::CollisionGroup > | mCollisionGroup |
| std::vector< shared_ptr< tower::Tower > > | mTowers |
| List of towers in the level. | |
| sf::Sprite | mBackground |
| Visual backdrop of level. | |
| Camera | mCamera |
| Camera that follows mHero. | |
| Hud | mHud |
| shared_ptr< Quadtree< unsigned char > > | terrainTree |
| Quadtree used to decide where towers can be placed. | |
| shared_ptr< ProjectileManager > | mProjectileManager |
| std::unique_ptr< TowerPlacer > | mTowerPlacer |
| Tool for placing towers. | |
| shared_ptr< Path > | mPath |
| Path that Minions will follow. | |
| shared_ptr< int > | mMoney |
| Amount of money at the player's disposal. Earned by killing Minions, spent on building towers. | |
| shared_ptr< int > | mLivesRemaining |
| Number of enemies that can make it through the level alive before losing. | |
| sf::FloatRect | mBounds |
| Bounds of the level. Pawns outside this are killed outright and mLivesRemaining is decremented every time it happens. | |
| sf::RenderTexture | mUnderlayTex |
| RenderTexture used for persisting dead bodies and blood without clogging the update. | |
| sf::Sprite | mUnderlaySpr |
| Sprite used to draw mUnderlayTex to the screen. | |
| sf::Music | mBgMusic |
| Background music of the level. | |
| const std::string | mNextLevel |
| Level to unlock if the player completes this level. | |
| shared_ptr< std::list< std::weak_ptr< Pawn > > > | mFlock |
| Flock of enemy minions. | |
| WaveController | mWaveController |
| Controller for spawning groups of units units after delays. | |
| BloodSystem | mBloodSystem |
Playable level of the game.
|
private |
Used to handle unfired projectile that are given to the projectile manager. Fires the projectile at the nearest enemy pawn.
| projectile | The projectile to fire. Must be unfired. |
|
overridevirtual |
Should draw the scene to the renderwindow
| w | The RenderWindow that the scene should be drawn to. |
Implements I_Scene.
|
overridevirtual |
| Event | The event to be handled. |
Implements I_Scene.
|
overridevirtual |
| elapsedTime | The amount of time that has past since the last time update was called. |
Implements I_Scene.