Added Tutorial Widget with Functionality
This commit is contained in:
parent
233125cc81
commit
fa3a811553
BIN
Content/Blueprints/Combat_UI/CombatTutorial.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Combat_UI/CombatTutorial.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Blueprints/Combat_UI/TutorialArrow.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Combat_UI/TutorialArrow.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Blueprints/Combat_UI/TutorialRippedPaper.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Combat_UI/TutorialRippedPaper.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -206,7 +206,6 @@ void ATempCharacter::InputDisabler()
|
||||
//TURNING OFF CROSSHAIR
|
||||
|
||||
CrossHairWidget->SetVisibility(ESlateVisibility::Hidden);
|
||||
ImportantStatsWidget->SetVisibility(ESlateVisibility::Hidden);
|
||||
|
||||
//Set to UI Mode Only
|
||||
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
|
||||
|
@ -27,6 +27,9 @@ ATurnBaseCombatV2::ATurnBaseCombatV2()
|
||||
|
||||
static ConstructorHelpers::FClassFinder<UUserWidget> DeathScreenWidgetClass(TEXT("/Game/Blueprints/Death_UI/Death_UI"));
|
||||
DeathScreenWidgetSubclass = DeathScreenWidgetClass.Class;
|
||||
|
||||
static ConstructorHelpers::FClassFinder<UUserWidget> CombatTutorialWidgetClass(TEXT("/Game/Blueprints/Combat_UI/CombatTutorial"));
|
||||
CombatTutorialWidget = CombatTutorialWidgetClass.Class;
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +37,13 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy)
|
||||
{
|
||||
if (Enemy == nullptr) return;
|
||||
UBlackboardComponent* EnemyBlackboard = Cast<AAIController>(Enemy->GetInstigatorController())->GetBlackboardComponent();
|
||||
if (!HasSeenTutorial)
|
||||
{
|
||||
ToggleButtons();
|
||||
CombatTutorialWidgetInstance = CreateWidget<UUserWidget>(GetWorld(), CombatTutorialWidget);
|
||||
CombatTutorialWidgetInstance->AddToViewport();
|
||||
HasSeenTutorial = true;
|
||||
}
|
||||
|
||||
if (EnemyBlackboard->GetValueAsBool("IsInCombat")) return;
|
||||
EnemyBlackboard->SetValueAsBool("IsInCombat", true);
|
||||
|
@ -54,6 +54,8 @@ public:
|
||||
UPROPERTY()
|
||||
UUserWidget* BookHUD;
|
||||
UPROPERTY()
|
||||
UUserWidget* CombatTutorialWidgetInstance;
|
||||
UPROPERTY()
|
||||
UWidgetComponent* PlayerWidget;
|
||||
/*
|
||||
TODO:
|
||||
@ -62,6 +64,10 @@ public:
|
||||
UPROPERTY(EditAnywhere)
|
||||
TSubclassOf<UUserWidget> HUDWidget;
|
||||
UPROPERTY(EditAnywhere)
|
||||
TSubclassOf<UUserWidget> CombatTutorialWidget;
|
||||
UPROPERTY()
|
||||
bool HasSeenTutorial = false;
|
||||
UPROPERTY(EditAnywhere)
|
||||
TMap<FString, int32> ValidCombos =
|
||||
{
|
||||
{"P", 5},
|
||||
@ -206,6 +212,7 @@ private:
|
||||
void ClearBattleLog();
|
||||
void UpdateBattleLog();
|
||||
void UpdateResourceBars() const;
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void ToggleButtons() const;
|
||||
void EnemyTurn();
|
||||
|
||||
|
BIN
UI designs/TutorialArrow.png
(Stored with Git LFS)
Normal file
BIN
UI designs/TutorialArrow.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UI designs/TutorialRippedPaper.png
(Stored with Git LFS)
Normal file
BIN
UI designs/TutorialRippedPaper.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user