2022-11-09 20:32:31 +00:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#include "GameFramework/GameStateBase.h"
|
|
|
|
#include "TurnBaseCombat.generated.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
UCLASS()
|
|
|
|
class THE_TWILIGHT_ABYSS_API ATurnBaseCombat : public AGameStateBase
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
public:
|
2022-11-13 21:31:25 +00:00
|
|
|
ATurnBaseCombat();
|
2022-11-09 20:32:31 +00:00
|
|
|
|
|
|
|
UPROPERTY(EditDefaultsOnly)
|
2022-11-13 21:31:25 +00:00
|
|
|
int PlayerHealth = 100;
|
2022-11-09 20:32:31 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly)
|
2022-11-13 21:31:25 +00:00
|
|
|
int EnemyHealth = 100;
|
2022-11-09 20:32:31 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly)
|
2022-11-13 21:31:25 +00:00
|
|
|
int DefaultActionPoints = 3;
|
|
|
|
int ActiveActionPoints = 0;
|
2022-11-09 20:32:31 +00:00
|
|
|
|
|
|
|
AActor* playerActor;
|
|
|
|
AActor* enemyActor;
|
2022-11-09 21:03:47 +00:00
|
|
|
AActor* activeActor;
|
2022-11-09 20:32:31 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
TODO:
|
|
|
|
Reference Action Library
|
2022-11-09 21:03:47 +00:00
|
|
|
Reference Player Inventory
|
|
|
|
Reference Combat Logging System
|
2022-11-09 20:32:31 +00:00
|
|
|
*/
|
2022-11-13 21:31:25 +00:00
|
|
|
UPROPERTY(EditAnywhere)
|
|
|
|
TSubclassOf<UUserWidget> HUDWidget;
|
2022-11-09 20:32:31 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void BeginPlay() override;
|
2022-11-13 21:31:25 +00:00
|
|
|
void UseActionPoint();
|
|
|
|
void ReuseActionPoint();
|
|
|
|
void RevertActionPoints();
|
2022-11-09 20:32:31 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
UPROPERTY(EditDefaultsOnly)
|
2022-11-13 21:31:25 +00:00
|
|
|
bool bIsPlayerTurn = true;
|
|
|
|
void SwitchTurn();
|
2022-11-09 20:32:31 +00:00
|
|
|
};
|