Files
LuckyWorld/Source/LuckyWorldV2/Public/Episode/EpisodeSubSystem.h

75 lines
1.5 KiB
C
Raw Normal View History

#pragma once
#include "CoreMinimal.h"
#include "Subsystems/WorldSubsystem.h"
#include "EpisodeSubSystem.generated.h"
2025-05-03 01:45:06 +07:00
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
*/
2025-05-03 01:45:06 +07:00
void StartNewEpisodesSeries(int32 EpisodesCountIn);
private:
2025-05-03 01:45:06 +07:00
// ---------------------
// ------- FLOW --------
// ---------------------
void StartEpisode();
// ---------------------
// ------- ROBOT -------
// ---------------------
// The state of capture - if true we should call the scene capture and data transfer
bool bIsCapturing = false;
2025-05-03 01:45:06 +07:00
int32 EpisodesCount = 0;
int32 CapturedEpisodes = 0;
void FindEpisodeObjectFromScene();
void FindRobotPawnFromScene();
UPROPERTY()
TObjectPtr<ARobotPawn> CurrentRobot;
2025-05-03 01:45:06 +07:00
// The object that will serve for the episode
TObjectPtr<AMujocoStaticMeshActor> EpisodeTargetObject;
FTransform CurrentObjectBaseLocation = FTransform::Identity;
FTransform CurrentObjectTargetLocation = FTransform::Identity;
// --------------------
// ------- DATA -------
// --------------------
// Noah here add anything you need
void ConfigureDataCapture();
void CreatePayload();
void SendEpisodeData();
};
2025-05-03 01:45:06 +07:00