Assign NakatomiCMC in BeginPlay and add getter
This commit is contained in:
parent
6bccd097bb
commit
08fbe9dbe1
|
@ -25,6 +25,8 @@ void ANakatomiCharacter::BeginPlay()
|
|||
Super::BeginPlay();
|
||||
|
||||
SetInventoryToDefault();
|
||||
|
||||
NakatomiCMC = Cast<UNakatomiCMC>(GetCharacterMovement());
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
|
@ -237,6 +239,11 @@ void ANakatomiCharacter::PushThrowableToInventory(TSubclassOf<AThrowable> Throwa
|
|||
}
|
||||
}
|
||||
|
||||
UNakatomiCMC* ANakatomiCharacter::GetCharacterMovementComponent()
|
||||
{
|
||||
return NakatomiCMC;
|
||||
}
|
||||
|
||||
void ANakatomiCharacter::CalculateHits(TArray<FHitResult>* hits)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -104,6 +104,8 @@ public:
|
|||
|
||||
void PushThrowableToInventory(TSubclassOf<AThrowable> Throwable);
|
||||
|
||||
UNakatomiCMC* GetCharacterMovementComponent();
|
||||
|
||||
protected:
|
||||
virtual void CalculateHits(TArray<FHitResult>* hits);
|
||||
|
||||
|
|
Loading…
Reference in New Issue