Create `OnFire`, `CalculateHits` and `ProcessHits` functions in `EnemyCharacter`
This commit is contained in:
parent
60deefdf96
commit
bf742b0224
|
@ -36,7 +36,24 @@ UAIPerceptionComponent* AEnemyCharacter::GetPerceptionComponent()
|
|||
return PerceptionComponent;
|
||||
}
|
||||
|
||||
void AEnemyCharacter::OnFire()
|
||||
{
|
||||
TArray<FHitResult> Hits = TArray<FHitResult>();
|
||||
CalculateHits(&Hits);
|
||||
ProcessHits(Hits);
|
||||
|
||||
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("BANG"));
|
||||
}
|
||||
|
||||
void AEnemyCharacter::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
}
|
||||
|
||||
void AEnemyCharacter::CalculateHits(TArray<FHitResult>* hits)
|
||||
{
|
||||
}
|
||||
|
||||
void AEnemyCharacter::ProcessHits(TArray<FHitResult> hits)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -37,6 +37,14 @@ public:
|
|||
|
||||
UAIPerceptionComponent* GetPerceptionComponent();
|
||||
|
||||
virtual void OnFire() override;
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
private:
|
||||
|
||||
virtual void CalculateHits(TArray<FHitResult>* hits) override;
|
||||
|
||||
virtual void ProcessHits(TArray<FHitResult> hits) override;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue