Create GetCrouched method in PlayerCharacter
This commit is contained in:
parent
afc30330a7
commit
957da3946a
|
@ -759,3 +759,13 @@ bool APlayerCharacter::GetPressedJump()
|
|||
{
|
||||
return jumpPressed;
|
||||
}
|
||||
|
||||
bool APlayerCharacter::GetCrouched()
|
||||
{
|
||||
if (UNakatomiCMC* cmc = GetCharacterMovementComponent())
|
||||
{
|
||||
return cmc->IsCrouching();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -221,6 +221,9 @@ public:
|
|||
UFUNCTION(BlueprintCallable)
|
||||
bool GetPressedJump();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
bool GetCrouched();
|
||||
|
||||
protected:
|
||||
virtual void CalculateHits(TArray<FHitResult>* hits) override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue