diff --git a/Content/Blueprints/Combat_UI/CombatTutorial.uasset b/Content/Blueprints/Combat_UI/CombatTutorial.uasset new file mode 100644 index 0000000..1c0b11a --- /dev/null +++ b/Content/Blueprints/Combat_UI/CombatTutorial.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05f336b1c91e2581cefefc64af48225b1feeb8575b413b170d81f946db32ee0e +size 60125 diff --git a/Content/Blueprints/Combat_UI/TutorialArrow.uasset b/Content/Blueprints/Combat_UI/TutorialArrow.uasset new file mode 100644 index 0000000..01d788c --- /dev/null +++ b/Content/Blueprints/Combat_UI/TutorialArrow.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec845a7c996cdf0f247ed9d0861eb855b5f4589a023f55c8894e1168e1e916de +size 46555 diff --git a/Content/Blueprints/Combat_UI/TutorialRippedPaper.uasset b/Content/Blueprints/Combat_UI/TutorialRippedPaper.uasset new file mode 100644 index 0000000..bacdb9d --- /dev/null +++ b/Content/Blueprints/Combat_UI/TutorialRippedPaper.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0c9172d2c3726132c8dc0353c09401986a825a6b6e16b3f1441dd92b17d588b +size 254292 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 3cff77e..b2aeee5 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -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(); diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 3cfe5b7..cafd417 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -27,6 +27,9 @@ ATurnBaseCombatV2::ATurnBaseCombatV2() static ConstructorHelpers::FClassFinder DeathScreenWidgetClass(TEXT("/Game/Blueprints/Death_UI/Death_UI")); DeathScreenWidgetSubclass = DeathScreenWidgetClass.Class; + + static ConstructorHelpers::FClassFinder 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(Enemy->GetInstigatorController())->GetBlackboardComponent(); + if (!HasSeenTutorial) + { + ToggleButtons(); + CombatTutorialWidgetInstance = CreateWidget(GetWorld(), CombatTutorialWidget); + CombatTutorialWidgetInstance->AddToViewport(); + HasSeenTutorial = true; + } if (EnemyBlackboard->GetValueAsBool("IsInCombat")) return; EnemyBlackboard->SetValueAsBool("IsInCombat", true); diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h index 190452e..7a9ca72 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h @@ -54,6 +54,8 @@ public: UPROPERTY() UUserWidget* BookHUD; UPROPERTY() + UUserWidget* CombatTutorialWidgetInstance; + UPROPERTY() UWidgetComponent* PlayerWidget; /* TODO: @@ -62,6 +64,10 @@ public: UPROPERTY(EditAnywhere) TSubclassOf HUDWidget; UPROPERTY(EditAnywhere) + TSubclassOf CombatTutorialWidget; + UPROPERTY() + bool HasSeenTutorial = false; + UPROPERTY(EditAnywhere) TMap ValidCombos = { {"P", 5}, @@ -206,6 +212,7 @@ private: void ClearBattleLog(); void UpdateBattleLog(); void UpdateResourceBars() const; + UFUNCTION(BlueprintCallable) void ToggleButtons() const; void EnemyTurn(); diff --git a/UI designs/TutorialArrow.png b/UI designs/TutorialArrow.png new file mode 100644 index 0000000..d3eb60d --- /dev/null +++ b/UI designs/TutorialArrow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f79041a10cfaa444bbbb1e7bfedd7bb5b763235859caa54f9ae97da138d1b755 +size 38882 diff --git a/UI designs/TutorialRippedPaper.png b/UI designs/TutorialRippedPaper.png new file mode 100644 index 0000000..6046489 --- /dev/null +++ b/UI designs/TutorialRippedPaper.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c87579172bfed2f61ae823ead07a4732667cdef302d7aa52c9fcbd883df918b +size 212882