AnnSplashLevel.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "systemMacro.h"
10 #include "AnnLevel.hpp"
11 #include <OgreHlmsUnlitDatablock.h>
12 
13 namespace Annwvyn
14 {
17  {
18  public:
21  AnnSplashLevel(Ogre::String splashTexture, std::shared_ptr<AnnLevel> nextLevel = nullptr, float timeoutTime = 10);
22 
24  void load() override;
25 
27  void runLogic() override;
28 
30  void unload() override;
31 
33  void setBGM(std::string name, bool preload = true);
34 
36  void setNextLevel(std::shared_ptr<AnnLevel> level);
37 
39  void setTimeout(float time);
40 
42  void setTimeoutMillisec(unsigned time);
43 
44  private:
46  void createSplashCurvedPlane();
47 
53  std::vector<AnnVect3> createCurvedPlaneVertices(float curvature, float width, float height, float definition);
54 
57  Ogre::HlmsUnlitDatablock* createSplashDatablock(Ogre::HlmsUnlit* unlit);
58 
60  float timeout, currentTime, startTime;
61 
64 
66  Ogre::ManualObject* CurvedPlane;
67 
69  Ogre::SceneNode* Splash;
70 
72  Ogre::String splashImageName;
73 
75  bool hasBGM;
76 
79  };
80 }
file for defining macros used for symbol export regarding the way the OS does things.
Ogre::ManualObject * CurvedPlane
The plane that present the object.
Base class for all Levels. Is abstract.
Definition: AnnLevel.hpp:26
Namespace containing the totality of Annwvyn components.
Definition: AnnGetter.cpp:8
std::weak_ptr< AnnLevel > next
Pointer to the next level to load.
Pure virtual class that represent a level AnnLevelManager class only handle object that derive from t...
std::string bgmName
Path to the file that is loaded as an audio buffer.
Ogre::SceneNode * Splash
Node where the splash screen is attached.
Ogre::String splashImageName
Name of the image of the splash-screen.
#define AnnDllExport
Definition: systemMacro.h:24
"Level" that display an image on a giant plane, then switchToLevel to another level after a timeout ...
bool hasBGM
True if music is set.
float timeout
Time values.