diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-04-10 00:40:12 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-04-10 00:40:12 +0400 |
commit | 09a5ffdf07677016b4e8eae8df02c47cd94ca6d8 (patch) | |
tree | 8a2103ec4c2174fe323e12b168821b9661bba8bf /source/gameengine/PyDoc | |
parent | 4669fa48a82f5f1070cf885cd1714e0a8ff8db3a (diff) |
BGE API cleanup: sound actuator.
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r-- | source/gameengine/PyDoc/KX_SoundActuator.py | 53 |
1 files changed, 51 insertions, 2 deletions
diff --git a/source/gameengine/PyDoc/KX_SoundActuator.py b/source/gameengine/PyDoc/KX_SoundActuator.py index 072af5b816c..383b45e6eb9 100644 --- a/source/gameengine/PyDoc/KX_SoundActuator.py +++ b/source/gameengine/PyDoc/KX_SoundActuator.py @@ -8,17 +8,53 @@ class KX_SoundActuator(SCA_IActuator): The L{startSound()}, L{pauseSound()} and L{stopSound()} do not require the actuator to be activated - they act instantly. + + @ivar filename: Sets the filename of the sound this actuator plays. + @type filename: string + + @ivar volume: Sets the volume (gain) of the sound. + @type volume: float + + @ivar pitch: Sets the pitch of the sound. + @type pitch: float + + @ivar rollOffFactor: Sets the roll off factor. Rolloff defines the rate of attenuation as the sound gets further away. + @type rollOffFactor: float + + @ivar looping: Sets the loop mode of the actuator. + @type looping: integer + + @ivar position: Sets the position of the sound. + @type position: float array + + @ivar velocity: Sets the speed of the sound; The speed of the sound alter the pitch. + @type velocity: float array + + @ivar orientation: Sets the orientation of the sound. When setting the orientation you can + also use quaternion [float,float,float,float] or euler angles [float,float,float] + @type orientation: 3x3 matrix [[float]] + + @ivar type: Sets the operation mode of the actuator. You can use one of the following constant: + KX_SOUNDACT_PLAYSTOP (1) + KX_SOUNDACT_PLAYEND (2) + KX_SOUNDACT_LOOPSTOP (3) + KX_SOUNDACT_LOOPEND (4) + KX_SOUNDACT_LOOPBIDIRECTIONAL (5) + KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP (6) + @type type: integer - @group Play Methods: startSound, pauseSound, stopSound + @group Play Methods: startSound, pauseSound, stopSound. """ def setFilename(filename): """ - Sets the filename of the sound this actuator plays. + DEPRECATED: Use the filename property instead. + Sets the filename of the sound this actuator plays. @type filename: string """ def getFilename(): """ + DEPRECATED: Use the filename property instead. Returns the filename of the sound this actuator plays. @rtype: string @@ -37,6 +73,7 @@ class KX_SoundActuator(SCA_IActuator): """ def setGain(gain): """ + DEPRECATED: Use the volume property instead Sets the gain (volume) of the sound @type gain: float @@ -44,24 +81,28 @@ class KX_SoundActuator(SCA_IActuator): """ def getGain(): """ + DEPRECATED: Use the volume property instead. Gets the gain (volume) of the sound. @rtype: float """ def setPitch(pitch): """ + DEPRECATED: Use the pitch property instead. Sets the pitch of the sound. @type pitch: float """ def getPitch(): """ + DEPRECATED: Use the pitch property instead. Returns the pitch of the sound. @rtype: float """ def setRollOffFactor(rolloff): """ + DEPRECATED: Use the rollOffFactor property instead. Sets the rolloff factor for the sounds. Rolloff defines the rate of attenuation as the sound gets further away. @@ -71,12 +112,14 @@ class KX_SoundActuator(SCA_IActuator): """ def getRollOffFactor(): """ + DEPRECATED: Use the rollOffFactor property instead. Returns the rolloff factor for the sound. @rtype: float """ def setLooping(loop): """ + DEPRECATED: Use the looping property instead. Sets the loop mode of the actuator. @bug: There are no constants defined for this method! @@ -90,12 +133,14 @@ class KX_SoundActuator(SCA_IActuator): """ def getLooping(): """ + DEPRECATED: Use the looping property instead. Returns the current loop mode of the actuator. @rtype: integer """ def setPosition(x, y, z): """ + DEPRECATED: Use the position property instead. Sets the position this sound will come from. @type x: float @@ -107,6 +152,7 @@ class KX_SoundActuator(SCA_IActuator): """ def setVelocity(vx, vy, vz): """ + DEPRECATED: Use the velocity property instead. Sets the velocity this sound is moving at. The sound's pitch is determined from the velocity. @@ -120,6 +166,7 @@ class KX_SoundActuator(SCA_IActuator): """ def setOrientation(o11, o12, o13, o21, o22, o23, o31, o32, o33): """ + DEPRECATED: Use the orientation property instead. Sets the orientation of the sound. The nine parameters specify a rotation matrix:: @@ -130,6 +177,7 @@ class KX_SoundActuator(SCA_IActuator): def setType(mode): """ + DEPRECATED: Use the type property instead. Sets the operation mode of the actuator. @param mode: KX_SOUNDACT_PLAYSTOP, KX_SOUNDACT_PLAYEND, KX_SOUNDACT_LOOPSTOP, KX_SOUNDACT_LOOPEND, KX_SOUNDACT_LOOPBIDIRECTIONAL, KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP @@ -138,6 +186,7 @@ class KX_SoundActuator(SCA_IActuator): def getType(): """ + DEPRECATED: Use the type property instead. Returns the operation mode of the actuator. @rtype: integer |