43#pragma region overridden_functions
47 return std::make_unique<Collider>(*
this);
50 auto onUpdate(
float dt) ->
void override;
59 auto load(
const Stream& stream) ->
void override;
60 auto save(
Stream& stream)
const ->
void override;
67#pragma region collider_functions
85#pragma region member_variables
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
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Collider.cpp:77
auto operator=(Collider &&other) noexcept -> Collider &=default
static auto bindLuaTypes(sol::state &lua) -> void
Definition Collider.cpp:34
Collider(const Collider &other)=default
Collider(Collider &&other) noexcept=default
auto operator=(const Collider &other) -> Collider &=default
friend auto from_json(const json &j, Collider &c) -> void
Definition Collider.cpp:137
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Collider.h:54
auto checkCollision(const Vector4D &position) const -> bool
Checks if a position is within the parent entity.
Definition Collider.cpp:96
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Collider.cpp:86
static auto getEnum() -> ComponentTypeEnum
Definition Collider.h:32
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition Collider.cpp:81
Collider()
Definition Collider.cpp:44
auto getColliderLayer() const -> unsigned int
Gets the collision layer of the collider.
Definition Collider.cpp:124
auto componentShowMenu() -> void override
Definition Collider.cpp:62
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Collider.cpp:91
auto onUpdate(float dt) -> void override
called once every frame.
Definition Collider.cpp:58
~Collider() override
Definition Collider.cpp:50
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Collider.h:45
friend auto to_json(json &j, const Collider &c) -> void
Definition Collider.cpp:129
unsigned int colliderLayer
Definition Collider.h:88
ComponentTypeEnum
This enum lists out every type of component we have.
Definition Component.h:39
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:24