Files
integration/Source/Integration/IntegrationGameModeBase.h
2023-06-09 16:47:46 -04:00

48 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "enginewrapper.hpp"
#include "engineutil.hpp"
#include "WorkerRunnable.hpp"
#include "IntegrationGameModeBase.generated.h"
/**
*
*/
UCLASS()
class INTEGRATION_API AIntegrationGameModeBase : public AGameModeBase
{
GENERATED_BODY()
public:
AIntegrationGameModeBase();
virtual void BeginPlay() override;
virtual void Tick(float) override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason);
inline bool luprex_initialized() {
return Luprex.play_initialize != nullptr;
}
// Set the entire contents of the console output box.
UFUNCTION(BlueprintImplementableEvent)
void ConsoleSetOutput(const FString& text);
UFUNCTION(BlueprintCallable)
void ConsoleSendInput(const FString& text);
void HandleConsoleOutput();
void WaitForWorkerThread();
// Refresh the console output.
FWorkerRunnable* Worker;
FRunnableThread* Thread;
engineutil::ConsoleOutput ConsoleOutput;
static EngineWrapper Luprex;
float EngineSeconds;
};