Terraria.ModLoader.SoundLoader.GetLegacySoundSlot C# (CSharp) Method

GetLegacySoundSlot() static private method

static private GetLegacySoundSlot ( SoundType type, string sound ) : LegacySoundStyle
type SoundType
sound string
return LegacySoundStyle
        internal static LegacySoundStyle GetLegacySoundSlot(SoundType type, string sound)
        {
            if (sounds[type].ContainsKey(sound))
            {
                return new LegacySoundStyle((int)type, sounds[type][sound]);
            }
            else
            {
                return null;
            }
        }

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Shorthand for calling SoundLoader.GetLegacySoundSlot(type, this.Name + '/' + name).
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="name">The name.</param>
 /// <returns></returns>
 public LegacySoundStyle GetLegacySoundSlot(SoundType type, string name) => SoundLoader.GetLegacySoundSlot(type, Name + '/' + name);