35 lines
840 B
C++
35 lines
840 B
C++
// Multiplayer By Caleb
|
|
|
|
|
|
#include "Crunch/Public/Character/CCharacter.h"
|
|
|
|
#include "GAS/CAbilitySystemComponent.h"
|
|
#include "GAS/CAttributeSet.h"
|
|
|
|
|
|
ACCharacter::ACCharacter()
|
|
{
|
|
PrimaryActorTick.bCanEverTick = true;
|
|
GetMesh()->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
|
|
|
CAbilitySystemComponent = CreateDefaultSubobject<UCAbilitySystemComponent>(TEXT("Ability System Component"));
|
|
CAttributeSet = CreateDefaultSubobject<UCAttributeSet>(TEXT("CAttribute Set"));
|
|
}
|
|
|
|
void ACCharacter::ServerSideInit()
|
|
{
|
|
CAbilitySystemComponent->InitAbilityActorInfo(this, this);
|
|
CAbilitySystemComponent->ApplyInitialEffects();
|
|
}
|
|
|
|
void ACCharacter::ClientSideInit()
|
|
{
|
|
CAbilitySystemComponent->InitAbilityActorInfo(this, this);
|
|
}
|
|
|
|
UAbilitySystemComponent* ACCharacter::GetAbilitySystemComponent() const
|
|
{
|
|
return CAbilitySystemComponent;
|
|
}
|
|
|