Implemented Stand in Bounty Director PC Asset

This commit is contained in:
Rafal Swierczek 2023-10-12 17:40:24 +01:00
parent 82979e32e0
commit e2561df38c
14 changed files with 61 additions and 17 deletions

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38bc96d6b46050e363e792f2362ef3fdb191cb5efc6f8c176794cb28bcb44b94
size 21920

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e2a0411ac8a6f3df1704187cfb5d62a200088e7d4605f05666b65e18645351d7
size 247653

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27c4b4b5d9be3a90d5643aea54f75e7f52f85f5158e6a8cf6806c1e0a8efb346
size 209883

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:112f033362de501319bab461fad7a299b4aa4e95f30f506514260da920a3af07
size 247528

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b5108f2d9e72c0c5935678a1fca2dda316472ca588e74e85fc321b9c7bf46933
size 73724

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7be067073df07be66cbc1d10a227dbdbdb65550aa37fc9ba7c7c4b7716e2ff41
size 4397
oid sha256:833df8f0fca89205f775bf4b28e645ebf10d9a1ef4a621370a8dc01612aa1031
size 5660

View File

@ -204,8 +204,13 @@ void ABountyDirector::Interact()
UPC_Display* PC_Display = Cast<UPC_Display>(PC_DisplayWidget);
bool GameOver = !IsValid(ActiveBounty);
PC_Display->PC_Display_Info.IsGameOver = GameOver;
PC_Display->LogoutFromBountyDirectorPC.AddDynamic(this, &ABountyDirector::DestroyBountyDirectorPCWidget);
if (GameOver) return;
if (GameOver)
{
PC_Display->LoadOS();
return;
}
// Info about main bounty
PC_Display->PC_Display_Info.MB_Title = GetBountyTitle();
@ -239,6 +244,21 @@ void ABountyDirector::Interact()
PC_Display->PC_Display_Info.CustomBountyAlteration_Cost.Add(ActiveBounty->GetCustomBountyAlteration_2_Cost());
PC_Display->PC_Display_Info.CustomBountyAlteration_Cost.Add(ActiveBounty->GetCustomBountyAlteration_3_Cost());
PC_Display->PC_Display_Info.PlayersFavourAmount = Favours;
PC_Display->LoadOS();
}
void ABountyDirector::DestroyBountyDirectorPCWidget()
{
if (IsValid(PC_DisplayWidget)) PC_DisplayWidget->RemoveFromParent();
FInputModeGameOnly InputMode;
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
PlayerController->SetInputMode(InputMode);
PlayerController->bShowMouseCursor = false;
PlayerController->bEnableClickEvents = false;
PlayerController->bEnableMouseOverEvents = false;
}

View File

@ -65,6 +65,9 @@ protected:
UFUNCTION()
void DestroyActiveSideBounties();
UFUNCTION()
void DestroyBountyDirectorPCWidget();
UFUNCTION()
void EarnFavours(int FavoursEarned);

View File

@ -43,18 +43,33 @@ struct FPC_Display_Info
UPROPERTY(BlueprintReadWrite, Category = "PC_Display_Info")
TArray<int> CustomBountyAlteration_Cost;
UPROPERTY(BlueprintReadWrite, Category = "PC_Display_Info")
int PlayersFavourAmount;
};
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FLogoutFromBountyDirectorPC);
UCLASS()
class ENDLESSVENDETTA_API UPC_Display : public UUserWidget
{
GENERATED_BODY()
protected:
UFUNCTION(BlueprintCallable, Category = "PC_Display")
void LogoutButtonPressed()
{
LogoutFromBountyDirectorPC.Broadcast();
}
public:
FLogoutFromBountyDirectorPC LogoutFromBountyDirectorPC;
UPROPERTY(BlueprintReadOnly)
FPC_Display_Info PC_Display_Info;
UFUNCTION(BlueprintImplementableEvent, Category = "PC_Display")
void LoadOS();
UPROPERTY(BlueprintReadOnly)
FPC_Display_Info PC_Display_Info;
};