Nano Brain for Unity v0.1
Loading...
Searching...
No Matches
Public Attributes | Protected Member Functions | Properties | List of all members
LightSensor Class Reference

Description

A light sensor.

Inheritance diagram for LightSensor:
Sensor

Public Attributes

bool useOcclusion = true
 If true, perform occlusion checks with raycasts.
 
float sensitivityAngle = 180f
 Angle in degrees for directional sensitivity; >= 180: omnidirectional.
 
float sensorRange = 10f
 Maximum distance the sensor detects anything.
 
float sampleInterval = 0.1f
 Time between samples in seconds.
 
LayerMask senseLayer
 Unity Layer for the light objects.
 
Neuron sensoryNeuron
 The NanoBrain::Neuron which is stimulated by this sensor.
 

Protected Member Functions

override float SampleSensor ()
 Performs a sampling function to retrieve a new sensor output value.
 
virtual void Awake ()
 Unity calls Awake when loading an instance of a script component.
 

Properties

float output [get, protected set]
 Output value of the sensor.
 

Member Function Documentation

◆ SampleSensor()

override float SampleSensor ( )
protectedvirtual

Performs a sampling function to retrieve a new sensor output value.

Returns
0.0

This is a dummy implementation which always returns 0.0 because this component is an abstract sensor

Reimplemented from Sensor.

Member Data Documentation

◆ senseLayer

LayerMask senseLayer
inherited

Unity Layer for the light objects.

This is used to improve performance