LEAP Documentation 40220
Documentation for the LEAP project
MapRotationReceiverComponent.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
7#include "MapRotationReceiverComponent.generated.h"
8
9UCLASS()
10class PROJECTX_API UMapRotationReceiverComponent : public UActorComponent
11{
12 GENERATED_UCLASS_BODY()
13
14public:
15 UFUNCTION(BlueprintPure, Category = MapReceiver)
16 bool IsReady() const { return bCompletedReceiving; }
17 UFUNCTION(BlueprintCallable, Category = MapReceiver)
18 void GetMapList(TArray<FString>& OutMapList) const { OutMapList.Empty(); if (IsReady()) { OutMapList = MapList; } }
19
20protected:
21 virtual void BeginPlay() override;
22
23 UFUNCTION()
24 virtual void StartMapRotationSend();
25
26 UFUNCTION()
27 void SendNextChunk();
28
29 UFUNCTION(Client, Reliable)
30 void Client_Reliable_SendInitialData(int32 Size);
31 UFUNCTION(Client, Reliable)
32 void Client_Reliable_SendChunk(int32 ChunkID, const TArray<FString>& ChunkInfo);
33 UFUNCTION(Server, Reliable, WithValidation)
34 void Server_Reliable_AcknowledgeChunk(int32 ChunkID);
35
36protected:
37 UPROPERTY()
38 int32 ChunkSize = 10;
39 UPROPERTY()
40 int32 CurrentChunk = 0;
41 UPROPERTY()
42 bool bCompletedReceiving = false;
43 UPROPERTY()
44 TArray<FString> MapList;
45};
Definition: MapRotationReceiverComponent.h:11