コード例 #1
0
 public static bool Prefix(Timelapser __instance, RenderTexture renderTex)
 {
     if (__instance == CustomTilapser.timelapser)
     {
         CustomTilapser.CustomWriteToPng(renderTex);
         return(false);
     }
     return(true);
 }
コード例 #2
0
ファイル: ButtonPatch.cs プロジェクト: yu-young-hoon/ONI-Mods
        public static void Postfix(PauseScreen __instance)
        {
            var instance    = Traverse.Create(__instance);
            var buttons     = instance.Field("buttons").GetValue <KButtonMenu.ButtonInfo[]>();
            var buttonsList = buttons.ToList();

            Instance = __instance;

            buttonsList.Insert(buttonsList.Count - 2, new KButtonMenu.ButtonInfo("Take a HD Screenshot", Action.NumActions,
                                                                                 () => { CustomTilapser.CreateScreen(Instance); }));

            instance.Field("buttons").SetValue(buttonsList.ToArray());
        }