44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "FunnyPrinceCharacter.h"
|
|
#include "SSTCharacterMovementComponent.h"
|
|
|
|
DEFINE_LOG_CATEGORY(LogTemplateFunnyPrinceCharacter);
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// AFunnyPrinceCharacter
|
|
|
|
AFunnyPrinceCharacter::AFunnyPrinceCharacter(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer.SetDefaultSubobjectClass<USSTCharacterMovementComponent>(ACharacter::CharacterMovementComponentName))
|
|
{
|
|
|
|
}
|
|
|
|
void AFunnyPrinceCharacter::BeginPlay()
|
|
{
|
|
// Call the base class
|
|
Super::BeginPlay();
|
|
}
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// Input
|
|
|
|
void AFunnyPrinceCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
|
{
|
|
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
|
}
|
|
|
|
bool AFunnyPrinceCharacter::CanJumpInternal_Implementation() const
|
|
{
|
|
USSTCharacterMovementComponent* Movement = Cast<USSTCharacterMovementComponent>(GetCharacterMovement());
|
|
|
|
if (Movement)
|
|
{
|
|
return Super::CanJumpInternal_Implementation() || Movement->CanWalljump();
|
|
}
|
|
|
|
return Super::CanJumpInternal_Implementation();
|
|
} |