|
static void | AddMusic (Mod mod, string musicPath) |
| Registers a new music track with the provided mod and its local path to the sound file. Use this for any music not autoloaded by the Mod.MusicAutoloadingEnabled logic. More...
|
|
static void | AddMusicBox (Mod mod, int musicSlot, int itemType, int tileType, int tileFrameY=0) |
| Allows you to tie a music ID, and item ID, and a tile ID together to form a music box.
When music with the given ID is playing, equipped music boxes have a chance to change their ID to the given item type.
When an item with the given item type is equipped, it will play the music that has musicSlot as its ID.
When a tile with the given type and Y-frame is nearby, if its X-frame is >= 36, it will play the music that has musicSlot as its ID. More...
|
|
static IAudioTrack | GetMusic (Mod mod, string musicPath) |
| Gets the music track with the specified mod path. The path must not have a file extension.
|
|
static IAudioTrack | GetMusic (string musicPath) |
| Gets the music track with the specified full path. The path must be prefixed with a mod name and must not have a file extension.
|
|
static int | GetMusicSlot (Mod mod, string musicPath) |
| Gets the music id of the track with the specified mod path. The path must not have a file extension.
|
|
static int | GetMusicSlot (string musicPath) |
| Gets the music id of the track with the specified full path. The path must be prefixed with a mod name and must not have a file extension.
|
|
static bool | MusicExists (Mod mod, string musicPath) |
| Returns whether or not a music track with the specified mod path exists. The path must not have a file extension.
|
|
static bool | MusicExists (string musicPath) |
| Returns whether or not a music track with the specified path exists. The path must be prefixed with a mod name and must not have a file extension.
|
|
static void MusicLoader.AddMusicBox |
( |
Mod |
mod, |
|
|
int |
musicSlot, |
|
|
int |
itemType, |
|
|
int |
tileType, |
|
|
int |
tileFrameY = 0 |
|
) |
| |
|
static |
Allows you to tie a music ID, and item ID, and a tile ID together to form a music box.
When music with the given ID is playing, equipped music boxes have a chance to change their ID to the given item type.
When an item with the given item type is equipped, it will play the music that has musicSlot as its ID.
When a tile with the given type and Y-frame is nearby, if its X-frame is >= 36, it will play the music that has musicSlot as its ID.
- Parameters
-
mod | The music slot. |
musicSlot | The music slot. |
itemType | Type of the item. |
tileType | Type of the tile. |
tileFrameY | The tile frame y. |
- Exceptions
-
ArgumentOutOfRangeException | Cannot assign music box to vanilla music id. or The provided music id does not exist. or Cannot assign music box to a vanilla item id. or The provided item id does not exist. or Cannot assign music box to a vanilla tile id. or The provided tile id does not exist |
ArgumentException | The provided music id has already been assigned a music box. or The provided item id has already been assigned a music. or Y-frame must be divisible by 36 |