Space Plunder
Loading...
Searching...
No Matches
MenuSystemLobbyGameMode.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/GameModeBase.h"
7#include "MenuSystemLobbyGameMode.generated.h"
8
9UCLASS()
10class MENUSYSTEM_API AMenuSystemLobbyGameMode : public AGameModeBase
11{
12 GENERATED_BODY()
13
14public:
16
17
18 virtual void RegisterPlayer(APlayerController* NewPlayer);
19
20
21 UPROPERTY(Replicated, VisibleAnywhere, BlueprintReadOnly, Category="Menu System|Lobby")
22 TArray<class AMenuSystemPlayerController*> AllPlayerControllers;
23
24 UFUNCTION(BlueprintCallable, Category="Menu System|Lobby")
25 void StartCountdown();
26 UFUNCTION(BlueprintCallable, Category="Menu System|Lobby")
27 void CancelCountdown();
28
29
30 UFUNCTION(BlueprintCallable, Category="Menu System|Lobby")
31 void DebugAddPlayerXP(APlayerController* Player, const int32 XP = 100);
32 UFUNCTION(BlueprintCallable, Category="Menu System|Lobby")
33 void DebugSaveProfile(APlayerController* Player);
34 UFUNCTION(BlueprintCallable, Category="Menu System|Lobby")
35 void DebugLoadProfile(APlayerController* Player);
36 UFUNCTION(BlueprintCallable, Category="Menu System|Lobby")
37 void DebugRefreshPlayerList();
38
39protected:
40
41 virtual void BeginPlay() override;
42
43 //- @TODO Get Rest of Player Profile from ID //
44 void SetPlayerName(const APlayerController* Player, const FString& Name) const;
45
46 //- Base Function that calls PostLogin & Handle Travel //
47 virtual void GenericPlayerInitialization(AController* Controller) override;
48
49 virtual void PostLogin(APlayerController* NewPlayer) override;
50 virtual void HandleSeamlessTravelPlayer(AController*& Controller) override;
51
52 virtual void SwapPlayerControllers(APlayerController* OldPC, APlayerController* NewPC) override;
53 virtual void Logout(AController* Exiting) override;
54
55
56
57 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Menu System|Lobby")
58 int32 StartDelay = 5;
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Menu System|Lobby")
60 bool bAutoStart = false;
61
62
63 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Menu System|Lobby")
64 class AMenuSystemGameState* MenuGameState = nullptr;
65private:
66
67 void StartGame() const;
68
69
70 uint32 NumberOfPlayers = 0;
71 uint32 MinNumberOfPlayers = 2;
72
73 FTimerHandle LoadMapTimerHandle;
74
75 void NotifyPlayersCountdownStarted(const int32 Delay);
76 void NotifyPlayersCountdownCanceled();
77
78};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition MenuSystemGameState.h:12
Definition MenuSystemLobbyGameMode.h:11
Definition MenuSystemPlayerController.h:13