Пример #1
0
 public static bool Draw(DialogueBox __instance, SpriteBatch b)
 {
     try
     {
         return(HarmonyPatchExecutors.Draw(__instance, b));
     }
     catch (Exception e)
     {
         ModEntry.ModMonitor.Log($"Failed in { nameof(Draw) }:\n{ e }", LogLevel.Error);
         return(true);
     }
 }
Пример #2
0
        public static bool DrawBox(DialogueBox __instance, SpriteBatch b, int xPos, int yPos, int boxWidth, int boxHeight)
        {
            try
            {
                // at this point nothing should go wrong, so we can safely ignore the original method.
                return(HarmonyPatchExecutors.DrawBox(__instance, b, xPos, yPos, boxWidth, boxHeight));
            }
            catch (Exception e)
            {
                ModEntry.ModMonitor.Log($"Failed in { nameof(DrawBox) }:\n{ e }", LogLevel.Error);

                return(true);
            }
        }
Пример #3
0
        public static bool DrawPortrait(DialogueBox __instance, SpriteBatch b)
        {
            try
            {
                HarmonyPatchExecutors.DrawPortrait(__instance, b);

                // at this point nothing should go wrong, so we can safely ignore the original method.
                return(false);
            }
            catch (Exception e)
            {
                ModEntry.ModMonitor.Log($"Failed in { nameof(DrawPortrait) }:\n{ e }", LogLevel.Error);

                return(true);
            }
        }