Module SCA_ISensor :: Class SCA_ISensor

Class SCA_ISensor

source code

SCA_ILogicBrick.SCA_ILogicBrick --+
                                  |
                                 SCA_ISensor
Known Subclasses:
SCA_MouseSensor.SCA_MouseSensor, KX_TouchSensor.KX_TouchSensor, KX_NetworkMessageSensor.KX_NetworkMessageSensor, KX_RaySensor.KX_RaySensor, SCA_AlwaysSensor.SCA_AlwaysSensor, SCA_KeyboardSensor.SCA_KeyboardSensor, SCA_PropertySensor.SCA_PropertySensor, SCA_RandomSensor.SCA_RandomSensor

Base class for all sensor logic bricks.

Instance Methods
integer
getFrequency()
The frequency for pulse mode sensors.
source code
 
getInvert()
True if this sensor activates on negative events.
source code
 
getUseNegPulseMode()
True if the sensor is in negative pulse mode.
source code
 
getUsePosPulseMode()
True if the sensor is in positive pulse mode.
source code
 
isPositive()
True if this sensor brick has been activated.
source code
 
setFrequency(freq)
Sets the frequency for pulse mode sensors.
source code
 
setInvert(invert)
Sets if this sensor activates on positive or negative events.
source code
 
setUseNegPulseMode(pulse)
Sets negative pulse mode.
source code
 
setUsePosPulseMode(pulse)
Sets positive pulse mode.
source code

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details

getFrequency()

source code 
The frequency for pulse mode sensors.
Returns: integer
the pulse frequency in 1/50 sec.

setFrequency(freq)

source code 
Sets the frequency for pulse mode sensors.
Returns:
the pulse frequency in 1/50 sec.

setInvert(invert)

source code 
Sets if this sensor activates on positive or negative events.
Parameters:
  • invert (boolean) - true if activates on negative events; false if activates on positive events.

setUseNegPulseMode(pulse)

source code 
Sets negative pulse mode.
Parameters:
  • pulse (boolean) - If True, will activate negative pulse mode for this sensor.

setUsePosPulseMode(pulse)

source code 
Sets positive pulse mode.
Parameters:
  • pulse (boolean) - If True, will activate positive pulse mode for this sensor.