Brunot
Loading...
Searching...
No Matches
Particles.h
Go to the documentation of this file.
1
10// ____ __ __ __
11// /\__ _\/\ \ /\ \/\ \
12// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
13// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
14// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
15// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
16// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
17
18
19#pragma once
20
21#include "Framework/System.h"
23
24namespace sys
25{
26class Particles : public System
27{
28public:
29#pragma region static_functions
30
34 static auto getEnum() -> Type
35 {
36 return Type::Particles;
37 }
38
39#pragma endregion
40
41 Particles();
42 ~Particles() override = default;
43 Particles(const Particles& other) = default;
44 Particles(Particles&& other) noexcept;
45 auto operator=(const Particles& other) -> Particles&;
46 auto operator=(Particles&& other) noexcept -> Particles& = default;
47
48
49#pragma region overridden_functions
50
51 auto clone() const -> std::unique_ptr<GameObject> override
52 {
53 return std::make_unique<Particles>(*this);
54 }
55
56
57 auto onUpdate(float dt) -> void override;
58
59 auto endWindow() -> void override
60 {
61 }; // for debug ImGUI
62 auto onRender() -> void override;
63 auto load(Stream& stream) -> void override;
64 auto save(Stream& stream) const -> void override;
65
66 auto addBlock(std::shared_ptr<ParticleBlock> newBlock) ->void
67 ;
68
69protected:
70 auto systemShowMenu() -> void override;
71
72public:
73#pragma endregion
74
75#pragma region Particles_Functions
76
77
78#pragma endregion
79
80private:
81#pragma region member_variables
82
83 std::vector<std::shared_ptr<ParticleBlock>> blocks;
84
85
86#pragma endregion
87
88#pragma region helper_functions
89
90#pragma endregion
91
92#pragma region static_variables
93
94#pragma endregion
95
96
97};
98}
sys::Json Stream
Definition AudioObject.h:20
A container for holding and updating particles that are all the same type.
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:24
Type
Definition System.h:20
@ Particles
Definition System.h:36
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
Particles()
Definition Particles.cpp:29
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Particles.h:59
auto onUpdate(float dt) -> void override
called once every frame.
Definition Particles.cpp:53
auto operator=(const Particles &other) -> Particles &
Definition Particles.cpp:39
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Particles.cpp:61
static auto getEnum() -> Type
function required by all systems
Definition Particles.h:34
~Particles() override=default
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Particles.h:51
auto load(Stream &stream) -> void override
Definition Particles.cpp:69
Particles(const Particles &other)=default
std::vector< std::shared_ptr< ParticleBlock > > blocks
Definition Particles.h:83
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition Particles.cpp:84
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Particles.cpp:74
auto operator=(Particles &&other) noexcept -> Particles &=default
auto addBlock(std::shared_ptr< ParticleBlock > newBlock) -> void
Definition Particles.cpp:79
the type of elements in a basic_json container
Definition GameObject.h:37