internal override void ClientInitialize() { userInterface = new UserInterface(); miscellaneousUI = new MiscellaneousUI(userInterface); miscellaneousUI.Activate(); userInterface.SetState(miscellaneousUI); }
public override void ClientTerminate() { //modSounds = null; //sounds = null; Interface = null; miscellaneousUI?.Deactivate(); miscellaneousUI = null; }
internal override void ClientInitialize() { userInterface = new UserInterface(); miscellaneousUI = new MiscellaneousUI(userInterface); miscellaneousUI.Activate(); userInterface.SetState(miscellaneousUI); On.Terraria.Main.PlaySound_int_int_int_int_float_float += Main_PlaySound_int_int_int_int_float_float; FieldInfo modSoundsField = typeof(SoundLoader).GetField("modSounds", BindingFlags.Static | BindingFlags.NonPublic); modSounds = (Dictionary <SoundType, IDictionary <int, ModSound> >)modSoundsField.GetValue(null); FieldInfo soundsField = typeof(SoundLoader).GetField("sounds", BindingFlags.Static | BindingFlags.NonPublic); sounds = (Dictionary <SoundType, IDictionary <string, int> >)soundsField.GetValue(null); // TODO: IdDictionary-type soundID }
public override void ClientInitialize() { Interface = new UserInterface(); miscellaneousUI = new MiscellaneousUI(Interface); miscellaneousUI.Activate(); Interface.SetState(miscellaneousUI); //On.Terraria.Audio.SoundEngine.PlaySound_int_int_int_int_float_float += SoundEngine_PlaySound_int_int_int_int_float_float; //FieldInfo modSoundsField = typeof(SoundLoader).GetField("modSounds", BindingFlags.Static | BindingFlags.NonPublic); //modSounds = (Dictionary<SoundType, IDictionary<int, ModSound>>)modSoundsField.GetValue(null); //FieldInfo soundsField = typeof(SoundLoader).GetField("sounds", BindingFlags.Static | BindingFlags.NonPublic); //sounds = (Dictionary<SoundType, IDictionary<string, int>>)soundsField.GetValue(null); //FieldInfo soundsField = typeof(SoundLoader).GetField("SoundsByFullPath", BindingFlags.Static | BindingFlags.NonPublic); //sounds = (Dictionary<object, object>)soundsField.GetValue(null); // TODO: IdDictionary-type soundID }