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.
62 lines
1.3 KiB
62 lines
1.3 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:
|
||
|
ASPGameState();
|
||
|
UFUNCTION(BlueprintCallable, Category="Game Start")
|
||
|
void StartLevel(FLevelSetup InLevelSetup);
|
||
|
|
||
|
UFUNCTION(BlueprintCallable)
|
||
|
void DecrementEnemies();
|
||
|
|
||
|
UPROPERTY(BlueprintReadWrite)
|
||
|
UObject* Saveable;
|
||
|
|
||
|
virtual void Tick(float DeltaSeconds) override;
|
||
|
|
||
|
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;
|
||
|
};
|