24#define I_DONT_NEED_COMPONENT_INCLUDES
26#undef I_DONT_NEED_COMPONENT_INCLUDES
46#define DECLARE_ENUMS(name, id, ...) c##name = id,
57 [[nodiscard]]
auto getKey() const -> Key override;
113 return left->getType() < right->getType();
auto to_json(json &j, const AudioObject &a) -> void
Definition AudioObject.cpp:376
#define DECLARE_ENUMS(name, id,...)
Definition Component.h:46
A modernized X macro that lets you do something for every component that exists in the engine.
#define FOR_ALL_COMPONENTS(DO)
a macro to do something for every component in the engine
Definition FOR_ALL_COMPONENTS.h:33
the base class for the engine, most things inherit from this.
nlohmann::json json
Definition Json.cpp:19
Definition Component.h:32
virtual auto componentShowMenu() -> void
Definition Component.h:63
auto getType() const -> ComponentTypeEnum
Definition Component.h:52
auto getComponentJson() const -> json
Definition Component.cpp:94
ComponentTypeEnum type
Definition Component.h:101
auto getChildren() const -> std::shared_ptr< std::vector< GameObject * > > override
override for component to return a vector of no children
Definition Component.cpp:101
auto showMenu() -> void override
Called before update each frame, for calling ImGui editor code relevant to the gameObject.
Definition Component.cpp:30
ComponentTypeEnum
This enum lists out every type of component we have.
Definition Component.h:39
@ cNewComponentStub
Definition Component.h:45
@ cErrorType
Definition Component.h:44
Component(ComponentTypeEnum type, const char *typeName)
Definition Component.cpp:72
auto pop() const -> std::unique_ptr< Component >
Removes the Component from its Entity parent, and gives ownership to the caller.
Definition Component.cpp:111
auto getEntityParent() const -> Entity *
gets the parent as an Entity.
Definition Component.cpp:106
auto getKey() const -> Key override
Generates a unique Key that corresponds to the GameObject.
Definition Component.cpp:25
the base class for the engine, most things inherit from this.
Definition GameObject.h:83
std::string typeName
the typeName of a GameObject.
Definition GameObject.h:562
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:24
Definition Component.cpp:81
Definition Component.h:110
auto operator()(const Component *left, const Component *right) const -> bool
Definition Component.h:111