Brunot
Loading...
Searching...
No Matches
NewComponentStub.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19#pragma once
20#include "Framework/Component.h"
21
23{
24public:
25#pragma region static_functions
26
27#pragma endregion
28
31 auto operator=(const NewComponentStub&) -> NewComponentStub& = default;
32 ~NewComponentStub() override = default;
33 NewComponentStub(NewComponentStub&& other) noexcept;
34 auto operator=(NewComponentStub&& other) noexcept -> NewComponentStub& = default;
35
36#pragma region overriden_functions
37
38 auto clone() const -> std::unique_ptr<GameObject> override
39 {
40 return std::make_unique<NewComponentStub>(*this);
41 }
42
43 /* Only override componentShowMenu if you have something to display
44 auto componentShowMenu() -> void override
45 {
46 } // for debug ImGUI
47 */
48 auto onUpdate(float dt) -> void override;
49
50 auto endWindow() -> void override
51 {
52 } // for debug ImGUI
53 auto onRender() -> void override;
54 auto load(Stream& stream) -> void override;
55 auto save(Stream& stream) const -> void override;
56
57 friend auto to_json(json& j, const NewComponentStub& n) -> void;
58 friend auto from_json(const json& j, NewComponentStub& n) -> void;
59
60
61#pragma endregion
62
63#pragma region newComponentStub_functions
64
65#pragma endregion
66
67#pragma region messaging_functions
68 auto linkMessages() -> void;
69
70#pragma endregion
71
72private:
73#pragma region member_variables
74
75#pragma endregion
76
77#pragma region helper_functions
78
79#pragma endregion
80
81#pragma region static_variables
82
83#pragma endregion
84
85};
sys::Json Stream
Definition AudioObject.h:20
The base class for components, holding all of their shared All components should inherit from this.
nlohmann::json json
Definition Json.cpp:19
Component(ComponentTypeEnum type, const char *typeName)
Definition Component.cpp:72
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Definition NewComponentStub.h:23
auto onUpdate(float dt) -> void override
called once every frame.
Definition NewComponentStub.cpp:44
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition NewComponentStub.cpp:58
auto operator=(const NewComponentStub &) -> NewComponentStub &=default
auto linkMessages() -> void
Definition NewComponentStub.cpp:78
NewComponentStub()
Definition NewComponentStub.cpp:23
auto load(Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition NewComponentStub.cpp:53
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition NewComponentStub.h:50
friend auto from_json(const json &j, NewComponentStub &n) -> void
Definition NewComponentStub.cpp:70
auto onRender() -> void override
called every frame after update has been called for every object.
Definition NewComponentStub.cpp:49
~NewComponentStub() override=default
auto operator=(NewComponentStub &&other) noexcept -> NewComponentStub &=default
friend auto to_json(json &j, const NewComponentStub &n) -> void
Definition NewComponentStub.cpp:63
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition NewComponentStub.h:38