tModLoader v0.11.8.9
A mod to make and play Terraria mods
ModSound.cs
Go to the documentation of this file.
1using Microsoft.Xna.Framework.Audio;
2
3namespace Terraria.ModLoader
4{
8 public class ModSound
9 {
13 public SoundEffect sound {
14 get;
15 internal set;
16 }
17
21 public virtual SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) {
22 return soundInstance;
23 }
24 }
25}
This class allows you to customize how a sound you add is played. To use this, pass an instance to Mo...
Definition: ModSound.cs:9
virtual SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
Override this hook to customize how this sound is played. If this sound is already currently playing,...
Definition: ModSound.cs:21
SoundEffect sound
The SoundEffect instance of the sound that this ModSound controls. This is here so you can call Creat...
Definition: ModSound.cs:13
SoundType
This is an enum of the types of sound you can add to the game. This is used for determining whether a...
Definition: SoundType.cs:13