59. Message Widget

This commit is contained in:
Edward R. Gonzalez 2024-04-26 21:36:09 -04:00
parent fe2abe1972
commit 07c5420bc2
16 changed files with 39 additions and 20 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Project/Content/UI/DT_StyleText_EffectMessage.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Project/Content/UI/RTD_Default.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Project/Content/UI/UI_EffectMessage.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Project/Content/UI/UI_Host.uasset (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,6 @@
{
"ColumnWidths":
{
"TextStyle": 1099
}
}

View File

@ -14,11 +14,14 @@ using namespace Gasa;
void UGasaAbilitySystemComp::OnAbilityActorInfoSet()
{
if ( ! OnGameplayEffectAppliedDelegateToSelf.IsBoundToObject(this))
OnGameplayEffectAppliedDelegateToSelf.AddUObject(this, & ThisClass::EffectApplied);
}
void UGasaAbilitySystemComp::EffectApplied(UAbilitySystemComponent* AbilitySystem, FGameplayEffectSpec const& Spec,
FActiveGameplayEffectHandle ActiveEffect)
{
Log("EFFECT APPLIED?");
FGameplayTagContainer Tags;
Spec.GetAllAssetTags(Tags);
Event_OnEffectAppliedAssetTags.Broadcast(Tags);
@ -27,6 +30,4 @@ void UGasaAbilitySystemComp::EffectApplied(UAbilitySystemComponent* AbilitySyste
void UGasaAbilitySystemComp::InitAbilityActorInfo(AActor* InOwnerActor, AActor* InAvatarActor)
{
Super::InitAbilityActorInfo(InOwnerActor, InAvatarActor);
OnGameplayEffectAppliedDelegateToSelf.AddUObject(this, & ThisClass::EffectApplied);
}

View File

@ -17,7 +17,6 @@ public:
FEffectAssetTagsSig Event_OnEffectAppliedAssetTags;
// TODO(Ed): If hes only using this to bind the EffectApplied to a delegate, then just use the init override instead.
void OnAbilityActorInfoSet();
void EffectApplied(UAbilitySystemComponent* AbilitySystem, FGameplayEffectSpec const& Spec, FActiveGameplayEffectHandle ActiveEffect);

View File

@ -158,7 +158,9 @@ void AGasaCharacter::PossessedBy(AController* NewController)
#if 0
if (bAutoAbilitySystem)
{
AbilitySystem->InitAbilityActorInfo(this, this);
}
#endif
}
@ -181,7 +183,10 @@ void AGasaCharacter::BeginPlay()
// TODO(Ed): Find out if this is the best spot todo this
// There is also OnPossessed, PostInitializeComponents, etc...
if (bAutoAbilitySystem)
{
AbilitySystem->InitAbilityActorInfo(this, this);
Cast<UGasaAbilitySystemComp>(AbilitySystem)->OnAbilityActorInfoSet();
}
}
void AGasaCharacter::Tick(float DeltaSeconds)

View File

@ -232,8 +232,7 @@ void AGasaGameMode::HandleSeamlessTravelPlayer(AController*& Controller)
void AGasaGameMode::InitializeHUDForPlayer_Implementation(APlayerController* NewPlayer)
{
// Super::InitializeHUDForPlayer_Implementation(NewPlayer);
NewPlayer->ClientSetHUD(HUDClass);
Super::InitializeHUDForPlayer_Implementation(NewPlayer);
}
void AGasaGameMode::InitSeamlessTravelPlayer(AController* NewController)

View File

@ -19,6 +19,7 @@
#include "GasaGameInstance.h"
#include "GasaGameState.h"
#include "GasaPlayerState.h"
#include "AbilitySystem/GasaAbilitySystemComponent.h"
#include "Actors/CameraMount.h"
#include "UI/GasaHUD.h"
#include "UI/WidgetController.h"
@ -75,7 +76,8 @@ void AGasaPlayerController::NetOwner_OnReady()
{
PlayerChar->AbilitySystem = PS->AbilitySystem;
PlayerChar->Attributes = PS->Attributes;
PlayerChar->AbilitySystem->InitAbilityActorInfo(PS, this);
PS->AbilitySystem->InitAbilityActorInfo(PS, PlayerChar);
Cast<UGasaAbilitySystemComp>(PS->AbilitySystem)->OnAbilityActorInfoSet();
}
Cam->AttachToActor(PlayerChar, FAttachmentTransformRules::KeepRelativeTransform);
}

View File

@ -14,8 +14,6 @@ void AGasaHUD::InitHostWidget(FWidgetControllerData const* WidgetControllerData)
HostWidgetController = NewObject<UHostWidgetController>(this, GetDevOptions()->Template_HostWidgetController.Get());
HostWidgetController->Data = (* WidgetControllerData);
HostWidget->SetWidgetController(HostWidgetController);
HostWidgetController->BindCallbacksToDependencies();
HostWidgetController->BroadcastInitialValues();
HostWidget->AddToViewport();
}