Methods
# playSound(url, volumeopt)
Sends a message to its pawn telling it to play a sound.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
string | The url of an external sound asset. |
||
volume |
number |
<optional> |
1 | The volume of the sound from 0 to 1. |
Example
import mySound from "./assets/boing.mp3";
myActor.playSound(mySound, 0.5);