// Project Lab - NHTV Igad

#pragma once

#include "GameState/DefaultGameMode.h"
#include "KOTHTeamState.h"
#include "KingOfTheHillGameMode.generated.h"

/**
 * 
 */
UCLASS(Config=Game)
class UNREALPROJECT_API AKingOfTheHillGameMode : public ADefaultGameMode
{
	GENERATED_BODY()
	
public:
	AKingOfTheHillGameMode();
	virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage) override;
	virtual void HandleMatchHasStarted() override;
	virtual void Tick(float DeltaTime) override;

	void AddScore(int team, float duration);
	void WinGame(int team);

	UPROPERTY(Config)
	float maxGameScore;

	UPROPERTY(BlueprintReadOnly)
	class AKOTHBossSpawner* bossSpawner;

private:
	int32 m_currentTeamWithHill;
	friend class AKOTHGameState;
};
