2#include "CppUnitTest.h"
3#include <Core/Engine/ECS/ECS.h>
5using namespace Microsoft::VisualStudio::CppUnitTestFramework;
66 m_testComponentCount++;
71 m_testComponentCount--;
76 m_eventVal =
event.ID;
80 bool m_initialized{
false };
81 Nui::I32 m_testComponentCount{ 0 };
82 Nui::I32 m_eventVal{ 0 };
This class provides a handle to a component.
Definition Component.h:52
The ECS context class manages entities, systems, and events in the ECS framework.
Definition Context.h:17
Internal::EntityComponentView< Types... > Each(bool includePendingDestroy=false)
Iterates over all entities in the ECS context (used in ranged loops)
Definition ECS.h:551
void SubscribeEvent(EventSubscriber< T > *subscriber)
Subscribes to an event in the ECS context.
Definition ECS.h:460
void UnsubscribeAll(void *subscriber)
Un-subscribes from all events in the ECS context (usually called in the system destructor)
Definition ECS.h:501
Class to represent an entity in an ECS Context.
Definition Entity.h:10
Base class for all event subscribers.
Definition Event.h:27
Base class for all ECS systems.
Definition System.h:10
Definition TestECSStructures.h:25
virtual void OnEvent(class Nui::ECS::Context *ctx, const Nui::ECS::Events::OnEntityDestroy &event) override
Pure virtual function for handling event callback.
Definition TestECSStructures.h:60
virtual void OnEvent(class Nui::ECS::Context *ctx, const Nui::ECS::Events::OnEntityCreate &event) override
Pure virtual function for handling event callback.
Definition TestECSStructures.h:56
virtual void OnShutdown(Nui::ECS::Context *ctx)
Called when the system is shutdown.
Definition TestECSStructures.h:51
virtual void OnEvent(class Nui::ECS::Context *ctx, const TestEvent &event) override
Pure virtual function for handling event callback.
Definition TestECSStructures.h:74
virtual void OnInit(Nui::ECS::Context *ctx)
Called when the system is initialized.
Definition TestECSStructures.h:29
virtual void OnEvent(class Nui::ECS::Context *ctx, const Nui::ECS::Events::OnComponentRemove< TestComponent > &event) override
Pure virtual function for handling event callback.
Definition TestECSStructures.h:69
virtual void OnEvent(class Nui::ECS::Context *ctx, const Nui::ECS::Events::OnComponentAdd< TestComponent > &event) override
Pure virtual function for handling event callback.
Definition TestECSStructures.h:64
virtual void OnUpdate(Nui::ECS::Context *ctx, const Nui::F64 dt)
Called when the system is updated (every frame)
Definition TestECSStructures.h:40
Event for when component is added.
Definition Event.h:75
Event for when component is removed.
Definition Event.h:93
Event for entity creation.
Definition Event.h:51
Event for entity destruction.
Definition Event.h:62
Definition TestECSStructures.h:8
Definition TestECSStructures.h:15