59. Message Widget
This commit is contained in:
		| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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); | ||||
| @@ -25,4 +24,4 @@ public: | ||||
| #pragma region AbilitySystemComponent | ||||
| 	void InitAbilityActorInfo(AActor* InOwnerActor, AActor* InAvatarActor) override; | ||||
| #pragma endregion AbilitySystemComponent | ||||
| }; | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user