ExoWest/Source/Exo/Private/Characters/ExoPlayerCharacter.cpp

28 lines
797 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "Characters/ExoPlayerCharacter.h"
#include "Characters/Components/ShootingComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "Player/InteractionComponent.h"
AExoPlayerCharacter::AExoPlayerCharacter()
{
GetCharacterMovement()->bSnapToPlaneAtStart = true;
InteractionComponent = CreateDefaultSubobject<UInteractionComponent>(TEXT("Interaction Component"));
ShootingComponent = CreateDefaultSubobject<UShootingComponent>(TEXT("Shooting Component"));
bUseControllerRotationPitch = true;
bUseControllerRotationYaw = true;
bUseControllerRotationRoll = false;
}
void AExoPlayerCharacter::BeginPlay()
{
Super::BeginPlay();
check(InteractionComponent && ShootingComponent);
}