|
index |
Sound library wrapper
Notes on how animation and materials (collisions) sounds work:
We create and define sounds using the sound objects. And we can assign it as Material and/or Animation.
If this is done we will play the sound depending on what was assigned. If we assign it as Animation we will play the sound when the animation is started.
If it was defined as Material we will play it as default sound on collision between objects.
A Material can also be assigned more than one sound and is done though a call where we define two Materials for each sound.
This will be played when these two objects collide with each other.
Some notes on Animation:
When playing an animation it is best to define the sound object to loop if we have an looping animation. Also if we
do not stop the current animation the sound will not stop. This means that before changing the animation we need to stop
the current playing animation so the sound stops correctly. This is handled currently by entity.setAnimation. It calls
stop animation if we have played one before.
|
||||||
|
|
|
|
||||||||
|
|
exceptions.Exception(exceptions.BaseException)
|
|
||
|
|
Kjartan A Jonsson |