C# Class Indiefreaks.Xna.Logic.Steering.AutonomousAgent

The AutonomousAgent class owns and exposes a set of Steering Behaviors that can be configured by the underlying SceneObject or SceneEntity.
Inheritance: NonPlayerAgent, IAutonomousEntity
Show file Open project: Indiefreaks/igf

Public Methods

Method Description
ApplySteeringForce ( GameTime gameTime ) : void

Applies the Steering Force to the current Velocity and Speed values

Override this method to modify how the computed Steering Force is applied

AutonomousAgent ( ) : System

Creates a new instance

DisableSteeringBehaviors ( ) : void

Disable all SteeringBehaviors

ForceVelocity ( Vector3 direction, float speed ) : void

OnInitialize ( ) : void

Event called when the component's parent object is assigned or reassigned.

OnUpdate ( GameTime gametime ) : void

Event called when the parent object is updated during the game update loop.

ResetVelocity ( ) : void

Resets Velocity to Zero immediately

UpdateParentObject ( GameTime gameTime ) : void

Based on the computed Velocity and Speed, updates the parent object World Matrix

Override this method to modify how the computed Velocity is applied

Private Methods

Method Description
AccumulateForce ( Vector3 &runningTot, Vector3 forceToAdd ) : bool
AdjustVelocityForSmoothRotation ( GameTime gameTime ) : Vector3
ComputePrioritizedDitheringSteeringForce ( ) : void
ComputePrioritizedTruncatedWeightedSteeringForce ( ) : void
ComputeTruncatedWeightedSteeringForce ( ) : void
ResetSteeringForces ( ) : void

Method Details

ApplySteeringForce() public method

Applies the Steering Force to the current Velocity and Speed values
Override this method to modify how the computed Steering Force is applied
public ApplySteeringForce ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

AutonomousAgent() public method

Creates a new instance
public AutonomousAgent ( ) : System
return System

DisableSteeringBehaviors() public method

Disable all SteeringBehaviors
public DisableSteeringBehaviors ( ) : void
return void

ForceVelocity() public method

public ForceVelocity ( Vector3 direction, float speed ) : void
direction Vector3
speed float
return void

OnInitialize() public method

Event called when the component's parent object is assigned or reassigned.
public OnInitialize ( ) : void
return void

OnUpdate() public method

Event called when the parent object is updated during the game update loop.
public OnUpdate ( GameTime gametime ) : void
gametime Microsoft.Xna.Framework.GameTime
return void

ResetVelocity() public method

Resets Velocity to Zero immediately
public ResetVelocity ( ) : void
return void

UpdateParentObject() public method

Based on the computed Velocity and Speed, updates the parent object World Matrix
Override this method to modify how the computed Velocity is applied
public UpdateParentObject ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void