Simulant  21.12-574
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
splash.h
1 #pragma once
2 
3 #include "../generic/property.h"
4 #include "../generic/managed.h"
5 #include "../types.h"
6 #include "scene.h"
7 #include "../nodes/ui/image.h"
8 #include "../nodes/ui/label.h"
9 
10 namespace smlt {
11 
12 
13 namespace scenes {
14 
15 class Splash:
16  public Scene<Splash> {
17 
18 public:
19  Splash(Window* window, const std::string& target_scene, float time=5.5):
20  Scene<Splash>(window),
21  target_(target_scene),
22  time_(time) {
23 
24  }
25 
26 private:
27  std::string target_;
28  float time_;
29  uint64_t start_time_ = 0;
30 
31  void activate() override;
32  void deactivate() override;
33 
34  void load() override;
35  void unload() override;
36 
37  void update(float dt) override;
38 
39  StagePtr stage_;
40  CameraPtr camera_;
41  PipelinePtr pipeline_;
42 
43  ui::Image* text_ = nullptr;
44  ui::Image* image_ = nullptr;
45 
46  SoundPtr sound_;
47 };
48 
49 }
50 }
smlt::ui::Image
Definition: image.h:15
smlt
Definition: animation.cpp:25
smlt::scenes::Splash
Definition: splash.h:16
smlt::Window
Definition: window.h:65
smlt::Scene
Definition: scene.h:165
smlt::default_init_ptr< Stage >