You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.2 KiB

9 months ago
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "LevelSetup.h"
#include "Saveable.h"
#include "GameFramework/GameStateBase.h"
#include "SPGameState.generated.h"
/**
*
*/
UCLASS()
class STREETPUNKZ_API ASPGameState : public AGameStateBase
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="Game Start")
void StartLevel(FLevelSetup InLevelSetup);
UFUNCTION(BlueprintCallable)
void DecrementEnemies();
void PlayerDead();
9 months ago
UPROPERTY(BlueprintReadWrite)
UObject* Saveable;
protected:
UPROPERTY(BlueprintReadOnly)
int32 AliveEnemies = -1;
UPROPERTY(BlueprintReadOnly)
TObjectPtr<APlayerController> PlayerController;
UPROPERTY(BlueprintReadOnly)
TObjectPtr<ACharacter> PlayerCharacter;
UPROPERTY(BlueprintReadOnly)
TArray<TObjectPtr<ACharacter>> EnemyCharacters;
UPROPERTY(BlueprintReadOnly)
TObjectPtr<ACameraActor> ActiveCamera;
UFUNCTION(BlueprintCallable)
void TransitionLevel();
UFUNCTION(BlueprintCallable)
void SpawnEnemies();
FTimerHandle FadeHandle;
FName NextLevelName = "BattleMap";
virtual void BeginPlay() override;
void FadeCamera();
void LoadNextLevel();
FLevelSetup LevelSetup;
};