r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
Intro.hpp
Go to the documentation of this file.
1///
2/// @file Intro.hpp
3/// @brief This file contains the intro scene
4/// @namespace cli
5///
6
7#pragma once
8
10#include "Interfaces/IAudio.hpp"
11#include "Utils/Clock.hpp"
12
13namespace cli
14{
15 ///
16 /// @class Intro
17 /// @brief Intro scene
18 /// @namespace cli
19 ///
20 class Intro final : public eng::AScene
21 {
22 public:
23 Intro(eng::id assignedId, const std::shared_ptr<eng::IRenderer> &renderer,
24 const std::shared_ptr<eng::IAudio> &audio);
25 ~Intro() override = default;
26
27 Intro(const Intro &other) = delete;
28 Intro &operator=(const Intro &other) = delete;
29 Intro(Intro &&other) = delete;
30 Intro &operator=(Intro &&other) = delete;
31
32 void update(float dt, const eng::WindowSize &size) override;
33 void event(const eng::Event &event) override;
34
35 std::function<void()> onLeave;
36
37 private:
38 std::shared_ptr<eng::IRenderer> m_renderer;
39 std::shared_ptr<eng::IAudio> m_audio;
40 float m_elapsedTime = 0.F;
41
45 }; // class Intro
46} // namespace cli
This file contains the Clock class.
This file contains the Audio interface.
Intro scene.
Definition Intro.hpp:21
std::shared_ptr< eng::IRenderer > m_renderer
Definition Intro.hpp:38
utl::Clock m_clock
Definition Intro.hpp:44
Intro & operator=(Intro &&other)=delete
Intro(eng::id assignedId, const std::shared_ptr< eng::IRenderer > &renderer, const std::shared_ptr< eng::IAudio > &audio)
Definition intro.cpp:8
ecs::Entity m_logoEntity
Definition Intro.hpp:42
void event(const eng::Event &event) override
Definition intro.cpp:100
std::shared_ptr< eng::IAudio > m_audio
Definition Intro.hpp:39
Intro & operator=(const Intro &other)=delete
Intro(const Intro &other)=delete
Intro(Intro &&other)=delete
ecs::Entity m_soundEntity
Definition Intro.hpp:43
~Intro() override=default
float m_elapsedTime
Definition Intro.hpp:40
void update(float dt, const eng::WindowSize &size) override
Definition intro.cpp:69
std::function< void()> onLeave
Definition Intro.hpp:35
Abstract class for scene.
Definition IScene.hpp:52
Class for clock.
Definition Clock.hpp:21
This file contains the IScene class.
std::uint32_t Entity
Definition Entity.hpp:13
unsigned int id
Definition IScene.hpp:20