Add new Sprint enemy movement speed
This commit is contained in:
parent
429cf58627
commit
265561dffb
|
@ -21,6 +21,9 @@ EBTNodeResult::Type UBTTSetMovementSpeed::ExecuteTask(UBehaviorTreeComponent& ow
|
||||||
case EPatrolMovementEnum::WALK:
|
case EPatrolMovementEnum::WALK:
|
||||||
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeed(walkSpeed);
|
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeed(walkSpeed);
|
||||||
break;
|
break;
|
||||||
|
case EPatrolMovementEnum::SPRINT:
|
||||||
|
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeed(sprintSpeed);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeedToDefault();
|
enemyPawn->GetCharacterMovementComponent()->SetMaxWalkSpeedToDefault();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -25,6 +25,8 @@ private:
|
||||||
float slowWalkSpeed = 250.0f;
|
float slowWalkSpeed = 250.0f;
|
||||||
|
|
||||||
float walkSpeed = 500.0f;
|
float walkSpeed = 500.0f;
|
||||||
|
|
||||||
|
float sprintSpeed = 750.0f;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& owner, uint8* memory) override;
|
virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& owner, uint8* memory) override;
|
||||||
|
|
Loading…
Reference in New Issue