예제 #1
0
 internal override void ClientInitialize()
 {
     userInterface   = new UserInterface();
     miscellaneousUI = new MiscellaneousUI(userInterface);
     miscellaneousUI.Activate();
     userInterface.SetState(miscellaneousUI);
 }
예제 #2
0
        public override void ClientTerminate()
        {
            //modSounds = null;
            //sounds = null;

            Interface = null;

            miscellaneousUI?.Deactivate();
            miscellaneousUI = null;
        }
예제 #3
0
        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
        }
예제 #4
0
        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
        }