Simulant  21.12-1303
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 : public Scene {
16 
17 public:
18  Splash(Window* window, const std::string& target_scene, float time=5.5):
19  Scene(window),
20  target_(target_scene),
21  time_(time) {
22 
23  }
24 
25 private:
26  std::string target_;
27  float time_;
28  uint64_t start_time_ = 0;
29 
30  void on_activate() override;
31  void on_deactivate() override;
32 
33  void on_load() override;
34  void on_unload() override;
35 
36  void on_update(float dt) override;
37 
38  CameraPtr camera_;
39 
40  AudioSource* source_ = nullptr;
41 
42  LayerPtr pipeline_;
43 
44  ui::Image* text_ = nullptr;
45  ui::Image* image_ = nullptr;
46 
47  SoundPtr sound_;
48 };
49 
50 }
51 }
smlt::AudioSource
Definition: audio_source.h:12
smlt::ui::Image
Definition: image.h:15
smlt
Definition: animation.cpp:25
smlt::scenes::Splash
Definition: splash.h:15
smlt::Window
Definition: window.h:68
smlt::Scene
Definition: scene.h:94
smlt::Layer
Definition: layer.h:26
smlt::Camera
Definition: camera.h:17