// 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 PlayerController; UPROPERTY(BlueprintReadOnly) TObjectPtr PlayerCharacter; UPROPERTY(BlueprintReadOnly) TArray> EnemyCharacters; UPROPERTY(BlueprintReadOnly) TObjectPtr ActiveCamera; UFUNCTION(BlueprintCallable) void TransitionLevel(); UFUNCTION(BlueprintCallable) void SpawnEnemies(); FTimerHandle FadeHandle; FName NextLevelName = "BattleMap"; virtual void BeginPlay() override; void FadeCamera(); void LoadNextLevel(); FLevelSetup LevelSetup; };