|
Drag[en]gine Script Module DragonScript 1.35
|
Impact material sound. More...
Public Member Functions | |
| String | getID () |
| Identifier. | |
| float | getImpulsePower () |
| Conversation factor from impulse to impact power. | |
| MaterialSound | getSound () |
| Impact sound. | |
| ImpactMaterialSound | new (String id) |
| Create material. | |
| ImpactMaterialSound | new (String id, ImpactMaterialSound material) |
| Create copy of material with new identifier. | |
| void | playSound (GameWorld world, CollisionInfo collision, ImpactMaterialSound material) |
| Play impact sound of this material hitting another. | |
| void | playSound (GameWorld world, DVector position, float impulse) |
| Play impact sound. | |
| void | playSound (GameWorld world, DVector position, float impulse, ImpactMaterialSound material) |
| Play impact sound of this material hitting another. | |
| void | setImpulsePower (float factor) |
| Set conversation factor from impulse to power. | |
| void | setSound (MaterialSound sound) |
| Set impact sound. | |
Impact material sound.
Material sounds used for objects hitting each other. Typically used for collisions between dynamic or kinematic colliders. Collider rig shapes are assigned the model texture they belong to. This can be used to figure out what skins are involved in the collision. Using SkinAnnotations the ImpactMaterialSound identifier for the skin file path can be looked up. Each ImpactMaterialSound involved in the collision plays back an impact sound. This allows to simulate a vaste amount of inter-material collisions without needing to record an explicit sound for each possible combination of materials. You only need to record a collision sound for each material.
| String Dragengine.Audio.MaterialSounds.ImpactMaterialSound.getID | ( | ) |
Identifier.
Referenced by setImpulsePower().
| float Dragengine.Audio.MaterialSounds.ImpactMaterialSound.getImpulsePower | ( | ) |
Conversation factor from impulse to impact power.
Referenced by playSound().
| MaterialSound Dragengine.Audio.MaterialSounds.ImpactMaterialSound.getSound | ( | ) |
Impact sound.
Referenced by setImpulsePower().
| ImpactMaterialSound Dragengine.Audio.MaterialSounds.ImpactMaterialSound.new | ( | String | id | ) |
| ImpactMaterialSound Dragengine.Audio.MaterialSounds.ImpactMaterialSound.new | ( | String | id, |
| ImpactMaterialSound | material ) |
Create copy of material with new identifier.
| void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.playSound | ( | GameWorld | world, |
| CollisionInfo | collision, | ||
| ImpactMaterialSound | material ) |
Play impact sound of this material hitting another.
| [in] | world | World to play sound in. |
| [in] | collision | Collision information originating by owner this material. |
| [in] | material | Hit material. If null default parameters are assumed. |
References setSound().
Referenced by playSound().
| void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.playSound | ( | GameWorld | world, |
| DVector | position, | ||
| float | impulse ) |
Play impact sound.
| [in] | world | World to play sound in. |
| [in] | position | Impact position in world space. |
| [in] | impulse | Impact impulse. |
References playSound().
| void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.playSound | ( | GameWorld | world, |
| DVector | position, | ||
| float | impulse, | ||
| ImpactMaterialSound | material ) |
Play impact sound of this material hitting another.
| [in] | world | World to play sound in. |
| [in] | position | Impact position in world space. |
| [in] | impulse | Impact impulse. |
| [in] | material | Hit material. If null default parameters are assumed. |
References getImpulsePower(), and setImpulsePower().
| void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.setImpulsePower | ( | float | factor | ) |
Set conversation factor from impulse to power.
References getID(), and getSound().
Referenced by playSound().
| void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.setSound | ( | MaterialSound | sound | ) |
Set impact sound.
Referenced by playSound().