D1/Source/D1/AI/SkeletonEnemy.cpp

19 lines
613 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "AI/SkeletonEnemy.h"
ASkeletonEnemy::ASkeletonEnemy()
{
//Setting WeaponMeshComponent
WeaponMeshComponent = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("WeaponMeshComponent"));
WeaponMeshComponent->SetRelativeLocationAndRotation(FVector(0.f, 0.f, 0.f), FRotator(0.f, 0.f, 0.f));
WeaponMeshComponent->SetupAttachment(GetMesh(), AttachSocketName);
WeaponMeshComponent->SetCollisionEnabled(ECollisionEnabled::NoCollision);
}
UPrimitiveComponent* ASkeletonEnemy::GetWeaponMesh()
{
return WeaponMeshComponent;
}