- #pragma once
- #include "CoreMinimal.h"
- #include "MatchmakingJob.h"
- #include "Subsystems/GameInstanceSubsystem.h"
- #include "MatchmakingSubsystem.generated.h"
- DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnMatchFound, FString, ServerIP);
- UCLASS()
- class SKYFRONTIER_API UMatchmakingSubsystem : public UGameInstanceSubsystem
- {
- GENERATED_BODY()
- public:
- virtual void Initialize(FSubsystemCollectionBase& Collection) override;
-
-
- UFUNCTION(BlueprintCallable)
- void RequestGame();
-
- UFUNCTION()
- void OnMatchmakerThreadDone(bool CompletionState, FString ServerIP);
-
-
- UPROPERTY(BlueprintReadOnly)
- FString CurrentState;
- UPROPERTY(BlueprintReadOnly)
- FString ServerToConnectTo;
-
-
- MatchmakingJob* FindMatchJob;
-
- UPROPERTY(BlueprintAssignable)
- FOnMatchFound MatchFoundEvent;
- };