#pragma once #include "CoreMinimal.h" #include "Subsystems/WorldSubsystem.h" #include "EpisodeSubSystem.generated.h" class AMujocoStaticMeshActor; class ARobotPawn; UCLASS() class LUCKYWORLDV2_API UEpisodeSubSystem : public UWorldSubsystem { GENERATED_BODY() public: // Setup UEpisodeSubSystem(); virtual void Initialize(FSubsystemCollectionBase& Collection); virtual void Deinitialize(); virtual void Tick(float DeltaTime); // --------------------- // ------- START ------- // --------------------- /** * Called by the UI when pressing the "Capture" button */ void StartNewEpisodesSeries(int32 EpisodesCountIn); private: // --------------------- // ------- FLOW -------- // --------------------- void StartEpisode(); // --------------------- // ------- ROBOT ------- // --------------------- // The state of capture - if true we should call the scene capture and data transfer bool bIsCapturing = false; int32 EpisodesCount = 0; int32 CapturedEpisodes = 0; void FindEpisodeObjectFromScene(); void FindRobotPawnFromScene(); UPROPERTY() TObjectPtr CurrentRobot; // The object that will serve for the episode TObjectPtr EpisodeTargetObject; FTransform CurrentObjectBaseLocation = FTransform::Identity; FTransform CurrentObjectTargetLocation = FTransform::Identity; // -------------------- // ------- DATA ------- // -------------------- // Noah here add anything you need void ConfigureDataCapture(); void CreatePayload(); void SendEpisodeData(); };