Added Death Screen
This commit is contained in:
parent
c5409fcaa7
commit
7585520586
BIN
Content/Blueprints/Death_UI/Death_UI.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Death_UI/Death_UI.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
@ -25,6 +25,9 @@ ATurnBaseCombatV2::ATurnBaseCombatV2()
|
|||||||
ThornsStatusEffect = StatusEffectThornsClassFinder.Class;
|
ThornsStatusEffect = StatusEffectThornsClassFinder.Class;
|
||||||
static ConstructorHelpers::FClassFinder<UStatusEffect> StatusEffectDOTClassFinder(TEXT("/Game/Blueprints/StatusEffects/BP_DamageOverTime"));
|
static ConstructorHelpers::FClassFinder<UStatusEffect> StatusEffectDOTClassFinder(TEXT("/Game/Blueprints/StatusEffects/BP_DamageOverTime"));
|
||||||
DOTStatusEffect = StatusEffectDOTClassFinder.Class;
|
DOTStatusEffect = StatusEffectDOTClassFinder.Class;
|
||||||
|
|
||||||
|
static ConstructorHelpers::FClassFinder<UUserWidget> DeathScreenWidgetClass(TEXT("/Game/Blueprints/Death_UI/Death_UI"));
|
||||||
|
DeathScreenWidgetSubclass = DeathScreenWidgetClass.Class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,7 +253,9 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo)
|
|||||||
}
|
}
|
||||||
if (*PlayerHealth <= 0)
|
if (*PlayerHealth <= 0)
|
||||||
{
|
{
|
||||||
EndCombat();
|
//EndCombat();
|
||||||
|
DeathScreenWidget = CreateWidget<UUserWidget>(GetWorld(), DeathScreenWidgetSubclass);
|
||||||
|
DeathScreenWidget->AddToViewport();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,4 +204,9 @@ private:
|
|||||||
void UpdateResourceBars() const;
|
void UpdateResourceBars() const;
|
||||||
void ToggleButtons() const;
|
void ToggleButtons() const;
|
||||||
void EnemyTurn();
|
void EnemyTurn();
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
UUserWidget* DeathScreenWidget;
|
||||||
|
UPROPERTY()
|
||||||
|
TSubclassOf<UUserWidget> DeathScreenWidgetSubclass;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user