Sensor
A sensor is used in events/transitions. It performs checks upon the world or variables. When the sensor is valid, the transition can be fired.
The actual code of the sensor must override the SensorCheck() method and must return true when valid and false when not.
All sensors have a Negate parameter that allows users to invert the sensor logic
The return type can also contain an IContext value called the event context that can be used in the transition's effector or token assign.
Note
In Unity, it's better to use the SafeSensorCheck() or UnityStepSensorCheck() methods to ensure the code is executed in Unity's thread. See create sensor.