I’m having a problem in UR v4.10.2 My intellisense is giving me an error on,
UCLASS(minimalapi)
class ATest2GameMode : public AGameMode
saying:
error: expexted a ‘;’
This is my code.
It is basically the 4.9 Battery collector code. But I can not get this part to work. I keep ge
#pragma once
#include "GameFramework/GameMode.h"
#include "Test2GameMode.generated.h"
/** enum to store the current state of gameplay */
UENUM(BlueprintType)
enum class EPlayState
{
EPlaying,
EGameOver,
EWon,
EUnknown
};
UCLASS(minimalapi)
class ATest2GameMode : public AGameMode
{
GENERATED_BODY()
public:
ATest2GameMode();
virtual void Tick(float DeltaTime) override;
/** Returns power needed to win - Needed for the HUD */
UFUNCTION(BlueprintPure, Category = "Power")
float GetPowerToWin() const;
virtual void BeginPlay() override;
/** Returns the current Play state */
UFUNCTION(BlueprintPure, Category = "Power")
EPlayState GetCurrentState() const;
/** Sets a new Playing state */
void SetCurrentState(EPlayState NewState);
protected:
/** The rate at which the character loses power */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Power")
float DecayRate;
/** The power needed to win the game */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Power", Meta = (BlueprintProtected = "true"))
float PowerToWin;
/** The widget class to use for our HUD screen */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Power", Meta = (BlueprintProtected = "true"))
TSubclassOf<class UUserWidget> HUDWidgetClass;
/** The instance of the HUD */
UPROPERTY()
class UUserWidget* CurrentWidget;
private:
/** Keeps track of current play state */
EPlayState CurrentState;
};