Пример #1
0
 internal override void UIDraw()
 {
     if (visible)
     {
         miscellaneousUI.Draw(Main.spriteBatch);
     }
 }
Пример #2
0
        //private Microsoft.Xna.Framework.Audio.SoundEffectInstance SoundEngine_PlaySound_int_int_int_int_float_float(On.Terraria.Audio.SoundEngine.orig_PlaySound_int_int_int_int_float_float orig, int type, int x, int y, int Style, float volumeScale, float pitchOffset) {
        //	var result = orig(type, x, y, Style, volumeScale, pitchOffset); // null results are off screen

        //	if (logSounds && Main.soundVolume != 0f && result != null) {
        //		if ((type >= 30 && type <= 35) || type == 39) {
        //			// Maybe a toggle to ignore?
        //		}
        //		else {
        //			float soundVolume = Main.soundVolume;
        //			Main.soundVolume = 0f;
        //			Main.NewText("");
        //			Main.NewText($"Type: {type}, Style: {Style}{(x != -1 ? $", x: {x}" : "")}{(y != -1 ? $", y: {y}" : "")}{(volumeScale != 1 ? $", volumeScale: {volumeScale}" : "")}{(pitchOffset != 0 ? $", pitchOffset: {pitchOffset}" : "")}");

        //			if (sounds.ContainsKey((SoundType)type)) {
        //				var kvp = sounds[(SoundType)type].FirstOrDefault(s => s.Value == Style);
        //				if (kvp.Key != null) { // struct
        //					Main.NewText($"Key: {kvp.Key}");
        //				}
        //				//var modSound = modSounds[SoundType.Custom][Style];
        //				//Main.NewText($"modSound: {modSound}");
        //			}

        //			var frames = new StackTrace(true).GetFrames();
        //			Logging.PrettifyStackTraceSources(frames);
        //			int index = 2;
        //			while (frames[index].GetMethod().Name.Contains("PlaySound"))
        //				index++;
        //			var frame = frames[index];
        //			Main.NewText(frame.GetMethod().DeclaringType.FullName + "." + frame.GetMethod().Name + ":" + frame.GetFileLineNumber());
        //			Main.soundVolume = soundVolume;
        //		}
        //	}
        //	return result;
        //}

        public override void UIDraw()
        {
            if (Visible)
            {
                miscellaneousUI.Draw(Main.spriteBatch);
            }
        }