parent
3151f79474
commit
33cae564e9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,13 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#include "GameOverWidget.h"
|
||||||
|
#include "Components/TextBlock.h"
|
||||||
|
|
||||||
|
|
||||||
|
void UGameOverWidget::SetWidgetText_Implementation(bool HasWon) {
|
||||||
|
if (HasWon) {
|
||||||
|
GameOverText->SetText(FText::FromString("You won!"));
|
||||||
|
} else {
|
||||||
|
GameOverText->SetText(FText::FromString("You lose!"));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Blueprint/UserWidget.h"
|
||||||
|
#include "GameOverWidget.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class TURNBASEDTUTORIAL_API UGameOverWidget : public UUserWidget {
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UFUNCTION(Client, Reliable)
|
||||||
|
void SetWidgetText(bool HasWon);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
class UButton *ButtonToMenu;
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
class UTextBlock *GameOverText;
|
||||||
|
};
|
Loading…
Reference in new issue