~ubuntu-branches/ubuntu/lucid/blender/lucid

« back to all changes in this revision

Viewing changes to source/gameengine/PyDoc/SCA_DelaySensor.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-08-06 22:32:19 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806223219-8z4eej1u8levu4pz
Tags: 2.49a+dfsg-0ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Build-depend on python-2.6 rather than python-2.5.
  - debian/misc/*.desktop: Add Spanish translation to .desktop 
    files.
  - debian/pyversions: 2.6.
  - debian/rules: Clean *.o of source/blender/python/api2_2x/
* New upstream release (LP: #382153).
* Refreshed patches:
  - 01_sanitize_sys.patch
  - 02_tmp_in_HOME
  - 10_use_systemwide_ftgl
  - 70_portability_platform_detection
* Removed patches merged upstream:
  - 30_fix_python_syntax_warning
  - 90_ubuntu_ffmpeg_52_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: SCA_DelaySensor.py 16320 2008-08-31 19:07:10Z ben2610 $
2
 
# Documentation for SCA_DelaySensor
3
 
from SCA_ISensor import *
4
 
 
5
 
class SCA_DelaySensor(SCA_ISensor):
6
 
        """
7
 
        The Delay sensor generates positive and negative triggers at precise time,
8
 
        expressed in number of frames. The delay parameter defines the length
9
 
        of the initial OFF period. A positive trigger is generated at the end of this period. 
10
 
        The duration parameter defines the length of the ON period following the OFF period.
11
 
        There is a negative trigger at the end of the ON period. If duration is 0, the sensor
12
 
        stays ON and there is no negative trigger.
13
 
        The sensor runs the OFF-ON cycle once unless the repeat option is set: the
14
 
        OFF-ON cycle repeats indefinately (or the OFF cycle if duration is 0).
15
 
        Use SCA_ISensor::reset() at any time to restart sensor.
16
 
        """
17
 
        def setDelay(delay):
18
 
                """
19
 
                Set the initial delay before the positive trigger.
20
 
                
21
 
                @param delay: length of the initial OFF period as number of frame, 0 for immediate trigger
22
 
                @type delay: integer
23
 
                """
24
 
        def setDuration(duration):
25
 
                """
26
 
                Set the duration of the ON pulse after initial delay and the generation of the positive trigger.
27
 
                If duration is greater than 0, a negative trigger is sent at the end of the ON pulse.
28
 
                
29
 
                @param duration: length of the ON period in number of frame after the initial OFF period
30
 
                @type duration: integer
31
 
                """     
32
 
        def setRepeat(repeat):
33
 
                """
34
 
                Set if the sensor repeat mode.
35
 
                
36
 
                @param repeat: 1 if the OFF-ON cycle should be repeated indefinately, 0 if it should run once.
37
 
                @type repeat: integer
38
 
                """             
39
 
        def getDelay():
40
 
                """
41
 
                Return the delay parameter value.
42
 
                
43
 
                @rtype: integer
44
 
                """
45
 
        def getDuration():
46
 
                """
47
 
                Return the duration parameter value
48
 
                
49
 
                @rtype: integer
50
 
                """
51
 
        def getRepeat():
52
 
                """
53
 
                Return the repeat parameter value
54
 
                
55
 
                @rtype: KX_TRUE or KX_FALSE
56
 
                """