Brunot
Loading...
Searching...
No Matches
ParticleManager.h
Go to the documentation of this file.
1
14// ____ __ __ __
15// /\__ _\/\ \ /\ \/\ \
16// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
17// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
18// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
19// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
20// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
21
22
23#pragma once
24
25#include "Framework/System.h"
27
28namespace sys
29{
38class ParticleManager : public System
39{
40public:
41#pragma region static_functions
42
46 static auto getEnum() -> Type
47 {
48 return Type::Particles;
49 }
50
51#pragma endregion
52
54 ~ParticleManager() override = default;
55 ParticleManager(const ParticleManager& other) = default;
56 ParticleManager(ParticleManager&& other) noexcept;
57 auto operator=(const ParticleManager& other) -> ParticleManager&;
58 auto operator=(ParticleManager&& other) noexcept -> ParticleManager& = default;
59
60
61#pragma region overridden_functions
62
63 auto clone() const -> std::unique_ptr<GameObject> override
64 {
65 return std::make_unique<ParticleManager>(*this);
66 }
67
68
69 auto onUpdate(float dt) -> void override;
70
71 auto endWindow() -> void override
72 {
73 }; // for debug ImGUI
74 auto onRender() -> void override;
75 auto load(const Stream& stream) -> void override;
76 auto save(Stream& stream) const -> void override;
77
82 auto addBlock(std::shared_ptr<ParticleBlock> newBlock) -> void;
83
87 auto showParticleSpreadsheet() -> void;
88
89protected:
90 auto systemShowMenu() -> void override;
91
92public:
93#pragma endregion
94
95#pragma region Particles_Functions
96
97
98#pragma endregion
99
100private:
101#pragma region member_variables
102
103 std::vector<std::shared_ptr<ParticleBlock>> blocks;
104
105
106#pragma endregion
107
108#pragma region helper_functions
109
110#pragma endregion
111
112#pragma region static_variables
113
114#pragma endregion
115
116
117};
118}
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:23
Type
Definition System.h:20
@ Particles
Definition System.h:35
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
std::vector< std::shared_ptr< ParticleBlock > > blocks
Definition ParticleManager.h:103
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition ParticleManager.h:63
auto showParticleSpreadsheet() -> void
draw the particle spreadsheet menu
Definition ParticleManager.cpp:98
auto operator=(const ParticleManager &other) -> ParticleManager &
Definition ParticleManager.cpp:43
ParticleManager()
Definition ParticleManager.cpp:32
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition ParticleManager.h:71
auto onUpdate(float dt) -> void override
called once every frame.
Definition ParticleManager.cpp:57
static auto getEnum() -> Type
function required by all systems
Definition ParticleManager.h:46
~ParticleManager() override=default
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition ParticleManager.cpp:88
auto onRender() -> void override
called every frame after update has been called for every object.
Definition ParticleManager.cpp:75
ParticleManager(const ParticleManager &other)=default
auto operator=(ParticleManager &&other) noexcept -> ParticleManager &=default
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition ParticleManager.cpp:120
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition ParticleManager.cpp:83
auto addBlock(std::shared_ptr< ParticleBlock > newBlock) -> void
gives ParticleManager a new particleBlock to keep track of
Definition ParticleManager.cpp:93
the type of elements in a basic_json container
Definition GameObject.h:32