33#pragma region static_functions
53#pragma region overridden_functions
57 return std::make_unique<ColliderSystem>(*
this);
60 auto onUpdate(
float dt) ->
void override;
69 auto load(
const Stream& stream) ->
void override;
70 auto save(
Stream& stream)
const ->
void override;
74#pragma region ColliderSystem_Functions
95#pragma region member_variables
105#pragma region helper_functions
109#pragma region messaging_functions
121#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:23
An indicator that loops through a parents' nodes children and can "select" them on keypress.
Definition Selector.h:31
Type
Definition System.h:20
@ ColliderSystem
Definition System.h:38
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:230
auto onUpdate(float dt) -> void override
called once every frame.
Definition ColliderSystem.cpp:62
Collider * lastHoveredCollider
Definition ColliderSystem.h:100
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition ColliderSystem.h:64
ColliderSystem()
Definition ColliderSystem.cpp:38
auto operator=(const ColliderSystem &other) -> ColliderSystem &
Definition ColliderSystem.cpp:48
std::vector< std::vector< Collider * > > colliders
Definition ColliderSystem.h:98
ColliderSystem(const ColliderSystem &other)=default
auto handleMouseClick() const -> void
Clicks the last hovered collider if one still exists.
Definition ColliderSystem.cpp:170
auto linkMessages() -> void
Definition ColliderSystem.cpp:237
Selector * lastFoundSelector
Definition ColliderSystem.h:101
~ColliderSystem() override=default
static auto getEnum() -> Type
function required by all systems
Definition ColliderSystem.h:38
auto removeCollider(const Collider *collider) -> void
Removes a collider from the multimap, typically called after it is deleted.
Definition ColliderSystem.cpp:183
auto onRender() -> void override
called every frame after update has been called for every object.
Definition ColliderSystem.cpp:141
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition ColliderSystem.h:55
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition ColliderSystem.cpp:145
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition ColliderSystem.cpp:156
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:151
auto addNewCollider(Collider *collider) -> void
Adds a new collider to the collider multimap so it can be checked for collisions later.
Definition ColliderSystem.cpp:165
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition ColliderSystem.cpp:128
the type of elements in a basic_json container
Definition GameObject.h:32