Event OnCutoff + OnStageStarted + OnStaageLoading modified to send contests Array

This commit is contained in:
2024-07-18 16:06:24 +02:00
parent 41284712b2
commit 68a7b34304
2 changed files with 19 additions and 14 deletions

View File

@ -110,7 +110,9 @@ void UDTFluxSubsystemTimer::OnStartTimer()
{
if(World->GetTimerManager().GetTimerRemaining(Timer.Handle) == 0)
{
OnStageStarted.Broadcast(Timer.ContestId, Timer.StageId);
TArray<int> ContestIds;
ContestIds.Add(Timer.ContestId);
OnStageStarted.Broadcast(ContestIds, Timer.StageId);
break;
}
}
@ -134,7 +136,9 @@ void UDTFluxSubsystemTimer::OnCutOffTimer()
{
if(World->GetTimerManager().GetTimerRemaining(Timer.Handle) == 0)
{
OnCutoff.Broadcast(Timer.ContestId, Timer.StageId);
TArray<int> ContestIds;
ContestIds.Add(Timer.ContestId);
OnCutoff.Broadcast(ContestIds, Timer.StageId);
break;
}
}
@ -164,19 +168,20 @@ void UDTFluxSubsystemTimer::ClearTimer(const int HandleIndex)
{
}
void UDTFluxSubsystemTimer::TriggerOnCutOff(const int ContestId, const int StageId)
void UDTFluxSubsystemTimer::TriggerOnCutOff(const TArray<int> ContestIds, const int StageId)
{
OnCutoff.Broadcast(ContestId, StageId);
OnCutoff.Broadcast(ContestIds, StageId);
}
void UDTFluxSubsystemTimer::TriggerStartTime(const int ContestId, const int StageId)
void UDTFluxSubsystemTimer::TriggerStartTime(const TArray<int> ContestIds, const int StageId)
{
OnStageStarted.Broadcast(ContestId, StageId);
OnStageStarted.Broadcast(ContestIds, StageId);
}
void UDTFluxSubsystemTimer::TriggerStageLoading(const int ContestId, const int StageId, int DelayBeforeStageStart)
void UDTFluxSubsystemTimer::TriggerStageLoading(const TArray<int> ContestIds, const int StageId, int DelayBeforeStageStart)
{
OnStageLoading.Broadcast(ContestId, StageId, DelayBeforeStageStart);
OnStageLoading.Broadcast(ContestIds, StageId, DelayBeforeStageStart);
}
UDTFluxSubsystem* UDTFluxSubsystemTimer::GetDTFluxSubSystem()

View File

@ -31,9 +31,9 @@ public:
FTimerHandle Handle;
};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnCutoff, int, ContestId, int, StageId);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnStageStarted, int, ContestId, int, StageId);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnStageLoading, int, ContestId, int, StageId, int, DelayBeforeStageStart);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnCutoff, TArray<int>, ContestIds, int, StageId);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnStageStarted, TArray<int>, ContestIds, int, StageId);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnStageLoading, TArray<int>, ContestIds, int, StageId, int, DelayBeforeStageStart);
UCLASS(BlueprintType, Category="DTFlux|Timer")
@ -79,13 +79,13 @@ public:
void ClearTimer(const int HandleIndex);
UFUNCTION(BlueprintCallable, Category="DTFlux|Timer")
void TriggerOnCutOff(const int ContestId, const int StageId);
void TriggerOnCutOff(const TArray<int> ContestIds, const int StageId);
UFUNCTION(BlueprintCallable, Category="DTFlux|Timer")
void TriggerStartTime(const int ContestId, const int StageId);
void TriggerStartTime(const TArray<int> ContestIds, const int StageId);
UFUNCTION(BlueprintCallable, Category="DTFlux|Timer")
void TriggerStageLoading(const int ContestId, const int StageId, int DelayBeforeStageStart);
void TriggerStageLoading(const TArray<int> ContestIds, const int StageId, int DelayBeforeStageStart);
static UDTFluxSubsystem* GetDTFluxSubSystem();
static UDTFluxDataStorage* GetDTFluxDataStorage();