Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  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 "SGameState.generated.h"
  8.  
  9. UENUM(BlueprintType)
  10. enum class EWaveState : uint8
  11. {
  12.     WaitingToStart,
  13.  
  14.     WaveInProgress,
  15.  
  16.     // No longer spawning new bots, waiting for players to kill remaining bots
  17.     WaitingToComplete,
  18.  
  19.     WaveComplete,
  20.  
  21.     GameOver,
  22. };
  23.  
  24.  
  25.  
  26.  
  27.  
  28. /**
  29.  *
  30.  */
  31. UCLASS()
  32. class COOPGAME_API ASGameState : public AGameModeBase
  33. {
  34.     GENERATED_BODY()
  35.  
  36. protected:
  37.  
  38.     UFUNCTION()
  39.     void OnRep_WaveState(EWaveState OldState);
  40.  
  41.     UFUNCTION(BlueprintImplementableEvent, Category = "GameState")
  42.     void WaveStateChanged(EWaveState NewState, EWaveState OldState);
  43.    
  44. public:
  45.  
  46.     UPROPERTY(BlueprintReadOnly, ReplicatedUsing=OnRep_WaveState, Category = "GameState")
  47.     EWaveState WaveState;
  48.  
  49.  
  50.  
  51. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement