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.
|
|
|
// 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();
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|