コード例 #1
0
ファイル: ModLoader.cs プロジェクト: akemimadoka/tModLoader
        public static SoundEffect GetSound(string name)
        {
            if (Main.dedServ)
            {
                return(null);
            }

            string modName, subName;

            SplitName(name, out modName, out subName);

            Mod mod = GetMod(modName);

            if (mod == null)
            {
                throw new MissingResourceException("Missing mod: " + name);
            }

            return(mod.GetSound(subName));
        }