Browse Source

Merge branch 'master' of https://github.com/bbepis/BepInEx

Bepis 7 years ago
parent
commit
5fffa28e28
2 changed files with 12 additions and 7 deletions
  1. 8 4
      Plugins/Screencap/ScreenshotManager.cs
  2. 4 3
      README.md

+ 8 - 4
Plugins/Screencap/ScreenshotManager.cs

@@ -12,25 +12,29 @@ namespace Screencap
     public class ScreenshotManager : BaseUnityPlugin
     {
         public override string Name => "Screenshot Manager";
+        Event ScreenKeyEvent;
+        Event CharacterKeyEvent;
 
         private string screenshotDir = Utility.CombinePaths(Utility.ExecutingDirectory, "UserData", "cap");
 
         public ScreenshotManager()
         {
+            ScreenKeyEvent = Event.KeyboardEvent("f9");
+            CharacterKeyEvent = Event.KeyboardEvent("f11");
             if (!Directory.Exists(screenshotDir))
                 Directory.CreateDirectory(screenshotDir);
         }
 
         void LateUpdate()
         {
-            if (UnityEngine.Event.current.Equals(Event.KeyboardEvent("f9")))
+            if (UnityEngine.Event.current.Equals(ScreenKeyEvent))
             {
-                string filename = Path.Combine(screenshotDir, $"Koikatsu -{DateTime.Now.ToString("yyyy-mm-dd-HH-mm-ss")}.png");
+                string filename = Path.Combine(screenshotDir, $"Koikatsu -{DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")}.png");
                 TakeScreenshot(filename);
             }
-            else if (UnityEngine.Event.current.Equals(Event.KeyboardEvent("f11")))
+            else if (UnityEngine.Event.current.Equals(CharacterKeyEvent))
             {
-                string filename = Path.Combine(screenshotDir, $"Koikatsu Char-{DateTime.Now.ToString("yyyy-mm-dd-HH-mm-ss")}.png");
+                string filename = Path.Combine(screenshotDir, $"Koikatsu Char-{DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")}.png");
                 TakeCharScreenshot(filename);
             }
         }

+ 4 - 3
README.md

@@ -1,6 +1,7 @@
 # BepInEx
-Koikatsu patcher
+Bepis Injector Extensible
+
+Koikatsu plugin framework
 
 ## Credits
-- Usagirei - Color Correction plugin, code for using the console and for being very helpful
-- Illusion Plugin Architecture (IPA) - Code for GameObject loading/framework
+- Usagirei - Color Correction plugin, code for using the console, unity scene dumper and for assisting with technical support