ChensHelpers
Chen.Helpers.GeneralHelpers
SoundPlayer Class
A helper class that allows playing sounds easily with just the WWise Event ID and a Keybind.
public class SoundPlayer
Inheritance System.Object 🡒 SoundPlayer
Constructors | |
---|---|
SoundPlayer(EventPosterKey[]) | Constructor to create an instance of the class. A group of EventPosterKeys may be passed as parameters to automatically register them. |
Methods | |
---|---|
RegisterKeybind(EventPosterKey) | Registers a keybind for a WWise Event that posts the event upon being pressed. Duplicated EventPosterKeys will be replaced by a later assignment. |
RegisterKeybind(KeyCode, uint[]) | Registers a keybind for a WWise Event that posts the event upon being pressed. Duplicated EventPosterKeys will be replaced by a later assignment. Alternative overload that does not use the EVentPosterKey data structure. |
Update() | Place this in a BaseUnityPlugin.Update() to enable the listeners for the keybinds registered. |