Skip to content

Commit

Permalink
Merge pull request #230 from kookmin-sw/feature/CSS-353
Browse files Browse the repository at this point in the history
  • Loading branch information
autumn-na authored May 30, 2024
2 parents 69fbf6c + 7ac9d19 commit d8aeb02
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 2 deletions.
Binary file not shown.
Binary file modified capstone_2024_20/Content/Level/Ingame.umap
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ UCannonWidgetComponent::UCannonWidgetComponent()
{
PrimaryComponentTick.bCanEverTick = true;
static ConstructorHelpers::FClassFinder<UUserWidget>
BP_WidgetFinder(TEXT("/Script/UMGEditor.WidgetBlueprint'/Game/WidgetBlueprints/Cannon_Widget.Cannon_Widget'"));
BP_WidgetFinder(TEXT("/Script/UMGEditor.WidgetBlueprint'/Game/WidgetBlueprints/Cannon_Widget.Cannon_Widget_C'"));

if (BP_WidgetFinder.Succeeded())
{
SetWidgetClass(BP_WidgetFinder.Class);
SetWidgetSpace(EWidgetSpace::Screen);
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("생성됨"));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "UpgradeNPCWidgetComponent.h"
#include "UpgradeNameWidget.h"

UUpgradeNPCWidgetComponent::UUpgradeNPCWidgetComponent()
{
PrimaryComponentTick.bCanEverTick = true;
static ConstructorHelpers::FClassFinder<UUserWidget>
BP_WidgetFinder(TEXT("/Script/UMGEditor.WidgetBlueprint'/Game/WidgetBlueprints/UpgradeNPC_NamePlateWidget.UpgradeNPC_NamePlateWidget_C'"));

if (BP_WidgetFinder.Succeeded())
{
SetWidgetClass(BP_WidgetFinder.Class);
SetWidgetSpace(EWidgetSpace::Screen);
}
}

void UUpgradeNPCWidgetComponent::BeginPlay()
{
Super::BeginPlay();
NameWidget = Cast<UUpgradeNameWidget>(GetWidget());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "UpgradeNameWidget.h"
#include "Components/WidgetComponent.h"
#include "UpgradeNPCWidgetComponent.generated.h"

/**
*
*/
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class CAPSTONE_2024_20_API UUpgradeNPCWidgetComponent : public UWidgetComponent
{
GENERATED_BODY()
public:
UUpgradeNPCWidgetComponent();

UPROPERTY()
UUpgradeNameWidget* NameWidget;

protected:
virtual void BeginPlay() override;

};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "UpgradeNameWidget.h"

17 changes: 17 additions & 0 deletions capstone_2024_20/Source/capstone_2024_20/UpgradeNameWidget.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "UpgradeNameWidget.generated.h"

/**
*
*/
UCLASS()
class CAPSTONE_2024_20_API UUpgradeNameWidget : public UUserWidget
{
GENERATED_BODY()

};

0 comments on commit d8aeb02

Please sign in to comment.