Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.AI.Sensors.Visual Class Reference

Detailed Description

Sensor that simulates character's view scope.

Inheritance diagram for Doloro.AI.Sensors.Visual:
Collaboration diagram for Doloro.AI.Sensors.Visual:

Public Types

enum  RotationSource { This , Sensor }
 

Public Member Functions

override void Init (Brain ai)
 Calling one time when AI initializing. More...
 
void ApplyDetected (Brain ai)
 Applying object defined at the selectedObject to AI's memory. More...
 
sealed override Result Pass (Brain ai)
 Performs base logic of sensor action. More...
 
virtual void End (Brain ai)
 Occurs when action execution is ended. Calls each time the node got an explicit result as a Result.Success or Result.Fail More...
 

Public Attributes

int raycastLayerMask = 0
 Raycast sensor detection layer mask.
 
float visionAngel = 65
 Angel in degrees of AI vision.
 
float radius = 10
 Radius of the vision. More...
 
bool aiOnly = true
 If true then will detect only objects with defined Brain component.
 
bool visualizeReycast = true
 Will create the debug component on AI game object that will work only in editor. Will draw the pool of raycast visions of AI.
 
RotationSource rotationSourceMode = RotationSource.This
 The source mode of rotation data source. This - rotation data will taken from AI's game object. Sensor - rotation data will taken from created zone sensor's game object.
 
float timeForDetection = 1
 Time in seconds that required for detection. If target will hide during this time range then sensor will not return Success.
 
bool overrideOnlyIfEmpty = true
 If true than variable will overridden only if isEmpty.
 
string selectedObjectVar
 Name of variable in AI's memory that contain the reference to found object.
 
bool invertedResult = false
 Return inverted targetBuffer. Fail to Success, Success to Fail.
 
int sensorID = 0
 Target Sensor ID at the AISensorsManager.
 

Protected Member Functions

override Result OnSelection (Brain ai)
 Detects object if raycast zone and return Success if found by layer and bundle. More...
 
sealed override Result InvertibleInternalPassLogic (Brain ai)
 Handler that should be used to define node's logic. More...
 
sealed override Result InternalPassLogic (Brain ai)
 Callback that calling by the pass More...
 

Protected Attributes

AISensorsManager manager
 Reference to the manager.
 

Properties

float detectionTime = -1 [get]
 Last time when was detected a target.
 
GameObject selectedObject [get, protected set]
 Reference to detected object.
 
Sensor sensor [get, set]
 Manager that collect the sensor data.
 
PipelineItem self [get, set]
 Reference to node that contains this action.
 
virtual DataManagement.DynamicResources.Version version [get]
 Source version. More...
 
virtual string author [get]
 Source author.
 

Member Function Documentation

◆ ApplyDetected()

void Doloro.AI.Sensors.ASelectingSensorAction.ApplyDetected ( Brain  ai)
inherited

Applying object defined at the selectedObject to AI's memory.

Parameters
aiSource AI instance.

◆ End()

virtual void Doloro.AI.Action.End ( Brain  ai)
virtualinherited

Occurs when action execution is ended. Calls each time the node got an explicit result as a Result.Success or Result.Fail

Parameters
aiSource AI entity.

Reimplemented in Doloro.AI.Parallel, and Doloro.AI.LogicCoresRoot.

◆ Init()

override void Doloro.AI.Sensors.Visual.Init ( Brain  ai)
virtual

Calling one time when AI initializing.

Parameters
aiSource AI entity.

Reimplemented from Doloro.AI.Sensors.ASelectingSensorAction.

◆ InternalPassLogic()

sealed override Result Doloro.AI.Sensors.AInvertibleSensorAction.InternalPassLogic ( Brain  ai)
protectedvirtualinherited

Callback that calling by the pass

Parameters
ai
Returns
Sensor reaction result.

Implements Doloro.AI.Sensors.ASensorAction.

◆ InvertibleInternalPassLogic()

sealed override Result Doloro.AI.Sensors.ASelectingSensorAction.InvertibleInternalPassLogic ( Brain  ai)
protectedvirtualinherited

Handler that should be used to define node's logic.

Parameters
aiSource AI.
Returns
Computed result.

Implements Doloro.AI.Sensors.AInvertibleSensorAction.

◆ OnSelection()

override Result Doloro.AI.Sensors.Visual.OnSelection ( Brain  ai)
protectedvirtual

Detects object if raycast zone and return Success if found by layer and bundle.

Parameters
ai
Returns

Implements Doloro.AI.Sensors.ASelectingSensorAction.

◆ Pass()

sealed override Result Doloro.AI.Sensors.ASensorAction.Pass ( Brain  ai)
virtualinherited

Performs base logic of sensor action.

Parameters
ai
Returns

Implements Doloro.AI.Action.

Member Data Documentation

◆ radius

float Doloro.AI.Sensors.Visual.radius = 10

Radius of the vision.

Even if greater then Sensor volume, will see only objects in sensor's bounds.

Property Documentation

◆ version

virtual DataManagement.DynamicResources.Version Doloro.AI.Action.version
getinherited
Initial value:
=
DataManagement.DynamicResources.Version._100

Source version.

Should be a constant value that defines what a version of relevant source is. Could be use for patching of the data according with version changes.


The documentation for this class was generated from the following file: