Polarith AI
1.7
AIMPerceptBehaviour< T > Class Template Reference

Description

This class extends the AIMBehaviour so that it is able to work with IPercept<T> instances which are relevant for the associated agent (front-end component).

Two possibilities are added for obtaining percept data to be processed. One way is to use the environment/perceiver/filter pipeline through the corresponding components AIMEnvironment, AIMPerceiver<T> and AIMFilter<T>. The other possibility is given by the GameObjects list which takes custom targeted objects for extracting the appropriate percept data. The inputs of both gets combined and the result is handed over to PerceptBehaviour<T>.Percepts of the underlying derived back-end class. When the specified objects are needed by multiple behaviours and/or agents, let the agents perceive them via the environment/perceiver/filter pipeline to increase the overall performance.

Derived AIMBehaviour front-end base component of every derived PerceptBehaviour<T>.

Template Parameters
TType of the percept holding extracted data, needs to implement IPercept<T> and to provide a constructor.
Type Constraints
T :IPercept<GameObject> 
T :new() 
Inheritance diagram for AIMPerceptBehaviour< T >:
AIMBehaviour IEvaluationPreparer

Public Fields

List< string > FilteredEnvironments = new List<string>()
 All environments to obtain the percepts for. More...
 
List< GameObject > GameObjects = new List<GameObject>()
 Allows to specify custom objects which should be processed by this behaviour. More...
 
int Order
 Specifies the execution order of this behaviour. More...
 
string Label
 Name to identify this component, e.g. More...
 

Protected Fields

AIMContext aimContext
 Quick access reference for derived classes to the component of the associated movement AI context. More...
 
Context context
 Quick access reference for derived classes to the associated movement AI context. More...
 

Properties

abstract PerceptBehaviour< T > PerceptBehaviour [get]
 Polymorphic reference to the underlying back-end class (read only). More...
 
override MoveBehaviour Behaviour [get]
 Polymorphic reference to the underlying back-end class (read only). More...
 
virtual bool ThreadSafe [get]
 Determines whether the underlying back-end MoveBehaviour is thread-safe (read only). More...
 
bool Enabled [get, set]
 Determines whether this component is enabled. More...
 

Public Methods

override void PrepareEvaluation ()
 Fetches percept data from the filter which matches the percept type T if there is one in the associated agent. More...
 

Protected Methods

override void OnEnable ()
 This method is called when the object becomes enabled and active. More...
 
virtual void Reset ()
 Reset to default values. More...
 
virtual void Awake ()
 Awake is called when the script instance is being loaded. More...
 
virtual void OnDisable ()
 This method is called when the behaviour becomes disabled or inactive. More...
 
virtual void OnDestroy ()
 This method is called when the MonoBehaviour will be destroyed. More...
 
virtual void OnValidate ()
 This function is called when the script is loaded or a value is changed in the inspector (editor only). More...
 
List< int > GetDefaultTargetObjectives ()
 Generates a list containing all objectives currently available within the associated Context. More...
 
void CheckFirstAndCentralOrder (Type type)
 Should be used in OnValidate for derived classes to ensure that they are executed at first. More...
 
void CheckLastOrder (Type type)
 Should be used in OnValidate for derived classes to ensure that they are executed at last. More...
 
Imprint