Module GameTypes :: Class KX_CDActuator
[frames] | no frames]

Class KX_CDActuator

PyObjectPlus --+            
               |            
          CValue --+        
                   |        
     SCA_ILogicBrick --+    
                       |    
           SCA_IActuator --+
                           |
                          KX_CDActuator

CD Controller actuator.

Instance Methods
 
startCD()
Starts the CD playing.
 
stopCD()
Stops the CD playing.
 
pauseCD()
Pauses the CD.
 
resumeCD()
Resumes the CD after a pause.
 
playAll()
Plays the CD from the beginning.
 
playTrack(trackNumber)
Plays the track selected.
bool
isA(game_type)
Check if this is a type or a subtype game_type. (Inherited from GameTypes.PyObjectPlus)
    Deprecated
 
setGain(gain)
Sets the gain (volume) of the CD.
float
getGain()
Gets the current gain (volume) of the CD.
integer
getExecutePriority()
Gets the execution priority of this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
string
getName()
Returns the name of the CValue. (Inherited from GameTypes.CValue)
KX_GameObject
getOwner()
Gets the game object associated with this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
 
setExecutePriority(priority)
Sets the priority of this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
Instance Variables
int executePriority
This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first). (Inherited from GameTypes.SCA_ILogicBrick)
float gain
the gain (volume) of the CD between 0.0 and 1.0.
bool invalid
Test if the object has been freed by the game engine and is no longer valid. (Inherited from GameTypes.PyObjectPlus)
string name
The name of this CValue derived object (read-only). (Inherited from GameTypes.SCA_ILogicBrick)
KX_GameObject or None in exceptional cases. owner
The game object this logic brick is attached to (read-only). (Inherited from GameTypes.SCA_ILogicBrick)
integer track
the track selected to be played
float volume
controls the volume to set the CD to.
Method Details

setGain(gain)

 

Sets the gain (volume) of the CD.

Parameters:
  • gain (float) - the gain to set the CD to. 0.0 = silent, 1.0 = max volume.

Deprecated: Use the volume property.

getGain()

 

Gets the current gain (volume) of the CD.

Returns: float
Between 0.0 (silent) and 1.0 (max volume)

Deprecated: Use the volume property.


Instance Variable Details

volume

controls the volume to set the CD to. 0.0 = silent, 1.0 = max volume.
Type:
float