34#pragma region static_functions
54#pragma region overridden_functions
58 return std::make_unique<ColliderSystem>(*
this);
61 auto onUpdate(
float dt) ->
void override;
70 auto load(
const Stream& stream) ->
void override;
71 auto save(
Stream& stream)
const ->
void override;
75#pragma region ColliderSystem_Functions
96#pragma region member_variables
106#pragma region helper_functions
110#pragma region messaging_functions
122#pragma region static_variables
sys::Json Stream
Definition AudioObject.h:20
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:24
An indicator that loops through a parents' nodes children and can "select" them on keypress.
Definition Selector.h:32
Type
Definition System.h:20
@ ColliderSystem
Definition System.h:39
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
auto receiveSelectClick(const Message *message) -> Message
Calls checkMouseCollision when a player clicks.
Definition ColliderSystem.cpp:233
auto onUpdate(float dt) -> void override
called once every frame.
Definition ColliderSystem.cpp:62
Collider * lastHoveredCollider
Definition ColliderSystem.h:101
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition ColliderSystem.h:65
ColliderSystem()
Definition ColliderSystem.cpp:38
auto operator=(const ColliderSystem &other) -> ColliderSystem &
Definition ColliderSystem.cpp:48
std::vector< std::vector< Collider * > > colliders
Definition ColliderSystem.h:99
ColliderSystem(const ColliderSystem &other)=default
auto handleMouseClick() const -> void
Clicks the last hovered collider if one still exists.
Definition ColliderSystem.cpp:173
auto linkMessages() -> void
Definition ColliderSystem.cpp:240
Selector * lastFoundSelector
Definition ColliderSystem.h:102
~ColliderSystem() override=default
static auto getEnum() -> Type
function required by all systems
Definition ColliderSystem.h:39
auto removeCollider(const Collider *collider) -> void
Removes a collider from the multimap, typically called after it is deleted.
Definition ColliderSystem.cpp:186
auto onRender() -> void override
called every frame after update has been called for every object.
Definition ColliderSystem.cpp:144
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition ColliderSystem.h:56
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition ColliderSystem.cpp:148
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition ColliderSystem.cpp:159
auto operator=(ColliderSystem &&other) noexcept -> ColliderSystem &=default
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition ColliderSystem.cpp:154
auto addNewCollider(Collider *collider) -> void
Adds a new collider to the collider multimap so it can be checked for collisions later.
Definition ColliderSystem.cpp:168
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition ColliderSystem.cpp:131
the type of elements in a basic_json container
Definition GameObject.h:37