M&B: Bannerlord 1.2.7
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
SandBox.Missions.AgentBehaviors.EscortAgentBehavior Class Reference

Inherits SandBox.Missions.AgentBehaviors.AgentBehavior.

Public Member Functions

delegate bool OnTargetReachedDelegate (Agent agent, ref Agent escortedAgent, ref Agent targetAgent, ref UsableMachine targetMachine, ref Vec3? targetPosition)
 
 EscortAgentBehavior (AgentBehaviorGroup behaviorGroup)
 
void Initialize (Agent escortedAgent, Agent targetAgent, OnTargetReachedDelegate onTargetReached=null)
 
void Initialize (Agent escortedAgent, UsableMachine targetMachine, OnTargetReachedDelegate onTargetReached=null)
 
void Initialize (Agent escortedAgent, Vec3? targetPosition, OnTargetReachedDelegate onTargetReached=null)
 
override void Tick (float dt, bool isSimulation)
 
bool IsEscortFinished ()
 
override float GetAvailability (bool isSimulation)
 
override string GetDebugInfo ()
 
- Public Member Functions inherited from SandBox.Missions.AgentBehaviors.AgentBehavior
virtual float GetAvailability (bool isSimulation)
 
virtual void Tick (float dt, bool isSimulation)
 
virtual void ConversationTick ()
 
virtual bool CheckStartWithBehavior ()
 
virtual void OnSpecialTargetChanged ()
 
virtual void SetCustomWanderTarget (UsableMachine customUsableMachine)
 
virtual void OnAgentRemoved (Agent agent)
 
abstract string GetDebugInfo ()
 

Static Public Member Functions

static void AddEscortAgentBehavior (Agent ownerAgent, Agent targetAgent, OnTargetReachedDelegate onTargetReached)
 
static void RemoveEscortBehaviorOfAgent (Agent ownerAgent)
 
static bool CheckIfAgentIsEscortedBy (Agent ownerAgent, Agent escortedAgent)
 

Protected Member Functions

override void OnDeactivate ()
 
- Protected Member Functions inherited from SandBox.Missions.AgentBehaviors.AgentBehavior
 AgentBehavior (AgentBehaviorGroup behaviorGroup)
 
virtual void OnActivate ()
 
virtual void OnDeactivate ()
 

Properties

Agent EscortedAgent [get]
 
Agent TargetAgent [get]
 
- Properties inherited from SandBox.Missions.AgentBehaviors.AgentBehavior
AgentNavigator Navigator [get]
 
bool IsActive [get, set]
 
Agent OwnerAgent [get]
 
Mission Mission [get]
 

Additional Inherited Members

- Public Attributes inherited from SandBox.Missions.AgentBehaviors.AgentBehavior
float CheckTime = 15.0f
 
- Protected Attributes inherited from SandBox.Missions.AgentBehaviors.AgentBehavior
readonly AgentBehaviorGroup BehaviorGroup
 

Constructor & Destructor Documentation

◆ EscortAgentBehavior()

SandBox.Missions.AgentBehaviors.EscortAgentBehavior.EscortAgentBehavior ( AgentBehaviorGroup  behaviorGroup)

Member Function Documentation

◆ OnTargetReachedDelegate()

delegate bool SandBox.Missions.AgentBehaviors.EscortAgentBehavior.OnTargetReachedDelegate ( Agent  agent,
ref Agent  escortedAgent,
ref Agent  targetAgent,
ref UsableMachine  targetMachine,
ref Vec3 targetPosition 
)

◆ Initialize() [1/3]

void SandBox.Missions.AgentBehaviors.EscortAgentBehavior.Initialize ( Agent  escortedAgent,
Agent  targetAgent,
OnTargetReachedDelegate  onTargetReached = null 
)

◆ Initialize() [2/3]

void SandBox.Missions.AgentBehaviors.EscortAgentBehavior.Initialize ( Agent  escortedAgent,
UsableMachine  targetMachine,
OnTargetReachedDelegate  onTargetReached = null 
)

◆ Initialize() [3/3]

void SandBox.Missions.AgentBehaviors.EscortAgentBehavior.Initialize ( Agent  escortedAgent,
Vec3 targetPosition,
OnTargetReachedDelegate  onTargetReached = null 
)

◆ Tick()

override void SandBox.Missions.AgentBehaviors.EscortAgentBehavior.Tick ( float  dt,
bool  isSimulation 
)
virtual

◆ IsEscortFinished()

bool SandBox.Missions.AgentBehaviors.EscortAgentBehavior.IsEscortFinished ( )

◆ GetAvailability()

override float SandBox.Missions.AgentBehaviors.EscortAgentBehavior.GetAvailability ( bool  isSimulation)
virtual

◆ OnDeactivate()

override void SandBox.Missions.AgentBehaviors.EscortAgentBehavior.OnDeactivate ( )
protectedvirtual

◆ GetDebugInfo()

override string SandBox.Missions.AgentBehaviors.EscortAgentBehavior.GetDebugInfo ( )
virtual

◆ AddEscortAgentBehavior()

static void SandBox.Missions.AgentBehaviors.EscortAgentBehavior.AddEscortAgentBehavior ( Agent  ownerAgent,
Agent  targetAgent,
OnTargetReachedDelegate  onTargetReached 
)
static

◆ RemoveEscortBehaviorOfAgent()

static void SandBox.Missions.AgentBehaviors.EscortAgentBehavior.RemoveEscortBehaviorOfAgent ( Agent  ownerAgent)
static

◆ CheckIfAgentIsEscortedBy()

static bool SandBox.Missions.AgentBehaviors.EscortAgentBehavior.CheckIfAgentIsEscortedBy ( Agent  ownerAgent,
Agent  escortedAgent 
)
static

Property Documentation

◆ EscortedAgent

Agent SandBox.Missions.AgentBehaviors.EscortAgentBehavior.EscortedAgent
get

◆ TargetAgent

Agent SandBox.Missions.AgentBehaviors.EscortAgentBehavior.TargetAgent
get