// Copyright Echo Devgroup #include "Character/AuraEnemy.h" #include "AbilitySystem/AuraAbilitySystemComponent.h" #include "AbilitySystem/AuraAttributeSet.h" #include "Aura/Aura.h" AAuraEnemy::AAuraEnemy() { GetMesh()->SetCollisionResponseToChannel(ECC_Visibility, ECR_Block); AbilitySystemComponent = CreateDefaultSubobject("AbilitySystemComponent"); AbilitySystemComponent->SetIsReplicated(true); AbilitySystemComponent->SetReplicationMode(EGameplayEffectReplicationMode::Minimal); AttributeSet = CreateDefaultSubobject("AttributeSet"); } void AAuraEnemy::HighlightActor() { bHighlighted = true; GetMesh()->SetRenderCustomDepth(true); GetMesh()->SetCustomDepthStencilValue(250.f); Weapon->SetRenderCustomDepth(true); Weapon->SetCustomDepthStencilValue(250.f); } void AAuraEnemy::UnHighlightActor() { bHighlighted = false; GetMesh()->SetRenderCustomDepth(false); Weapon->SetRenderCustomDepth(false); } int32 AAuraEnemy::GetPlayerLevel() { return Level; } void AAuraEnemy::BeginPlay() { Super::BeginPlay(); InitAbilityActorInfo(); } void AAuraEnemy::InitAbilityActorInfo() { AbilitySystemComponent->InitAbilityActorInfo(this,this); Cast(AbilitySystemComponent)->AbilityActorInfoSet(); }