Space Plunder
Loading...
Searching...
No Matches
FStateTree_Shoot Struct Reference

Represents a state for shooting behavior. More...

#include <STT_Shoot.h>

Inheritance diagram for FStateTree_Shoot:

Public Types

using FInstanceDataType = FStateTreeShootInstanceData
 

Public Member Functions

 FStateTree_Shoot ()=default
 
virtual const UStruct * GetInstanceDataType () const override
 
virtual EStateTreeRunStatus EnterState (FStateTreeExecutionContext &Context, const FStateTreeTransitionResult &Transition) const override
 
virtual void ExitState (FStateTreeExecutionContext &Context, const FStateTreeTransitionResult &Transition) const override
 

Public Attributes

bool bStartShooting = true
 

Detailed Description

Represents a state for shooting behavior.

This class inherits from FStateTreeTaskCommonBase.

Member Typedef Documentation

◆ FInstanceDataType

Constructor & Destructor Documentation

◆ FStateTree_Shoot()

FStateTree_Shoot::FStateTree_Shoot ( )
default

Member Function Documentation

◆ EnterState()

EStateTreeRunStatus FStateTree_Shoot::EnterState ( FStateTreeExecutionContext & Context,
const FStateTreeTransitionResult & Transition ) const
overridevirtual
12{
13 UE_LOG(LogAIToolKit, Warning, TEXT("Enter Shooting State Task"));
14 const APawn* OwnerPawn = Cast<APawn>(Context.GetOwner());
15 if(OwnerPawn != nullptr)
16 {
17 IAIActionsInterface* AIActions = Cast<IAIActionsInterface>(OwnerPawn->Controller);
18 if(AIActions != nullptr)
19 {
20 UE_LOG(LogAIToolKit, Warning, TEXT("Owner PAWN Shoot PASSED"));
21 AIActions->ShootAction(bStartShooting);
22 return EStateTreeRunStatus::Succeeded;
23 }
24 }
25 return EStateTreeRunStatus::Failed;
26}
Definition AIActionsInterface.h:20
virtual void ShootAction(const bool bStartShooting=true)=0
bool bStartShooting
Definition STT_Shoot.h:43

◆ ExitState()

void FStateTree_Shoot::ExitState ( FStateTreeExecutionContext & Context,
const FStateTreeTransitionResult & Transition ) const
overridevirtual
30{
31 UE_LOG(LogAIToolKit, Warning, TEXT("Exit Shoot State"));
32 FStateTreeTaskCommonBase::ExitState(Context, Transition);
33}

◆ GetInstanceDataType()

virtual const UStruct * FStateTree_Shoot::GetInstanceDataType ( ) const
inlineoverridevirtual
35{ return FInstanceDataType::StaticStruct(); }

Member Data Documentation

◆ bStartShooting

bool FStateTree_Shoot::bStartShooting = true

The documentation for this struct was generated from the following files: