BGE patch: New Delay sensor (derived from patch #17472)
authorBenoit Bolsee <benoit.bolsee@online.be>
Sat, 16 Aug 2008 20:45:37 +0000 (20:45 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Sat, 16 Aug 2008 20:45:37 +0000 (20:45 +0000)
commitfda00bc034de33371c4c7471467889f7d33c780b
tree4f239406f7bafb931d74ab11088f6239f3822eef
parentae42934c935c654d4ec29c2156a8ebe212f3652e
BGE patch: New Delay sensor (derived from patch #17472)

Introduction of a new Delay sensor that can be used to
generate positive and negative triggers at precise time,
expressed in number of frames.
The delay parameter defines the length of the initial
OFF period. A positive trigger is generated at the end
of this period. The duration parameter defines the
length of the ON period following the OFF period.
A negative trigger is generated at the end of the ON period.
If duration is 0, the sensor stays ON and there is no
negative trigger.
The sensor runs the OFF-ON cycle once unless the repeat
option is set: the OFF-ON cycle repeats indefinately
(or the OFF cycle if duration is 0).

The new generic SCA_ISensor::reset() Python function
can be used at any time to restart the sensor: the
current cycle is interrupted and no trigger is generated.
13 files changed:
projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj
source/blender/blenkernel/intern/sca.c
source/blender/blenloader/intern/writefile.c
source/blender/makesdna/DNA_sensor_types.h
source/blender/src/buttons_logic.c
source/gameengine/Converter/KX_ConvertSensors.cpp
source/gameengine/GameLogic/SCA_DelaySensor.cpp [new file with mode: 0644]
source/gameengine/GameLogic/SCA_DelaySensor.h [new file with mode: 0644]
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_ISensor.h
source/gameengine/PyDoc/GameLogic.py
source/gameengine/PyDoc/SCA_DelaySensor.py [new file with mode: 0644]
source/gameengine/PyDoc/SCA_ISensor.py