internal static void InstallEvents()
 {
     ScreenshotRequested_t.Install(x => OnScreenshotRequested?.Invoke());
     ScreenshotReady_t.Install(x =>
     {
         if (x.Result != Result.OK)
         {
             OnScreenshotFailed?.Invoke(x.Result);
         }
         else
         {
             OnScreenshotReady?.Invoke(new Screenshot {
                 Value = x.Local
             });
         }
     });
 }
예제 #2
0
 internal static void InstallEvents()
 {
     ScreenshotRequested_t.Install((ScreenshotRequested_t x) => {
         Action onScreenshotRequested = SteamScreenshots.OnScreenshotRequested;
         if (onScreenshotRequested != null)
         {
             onScreenshotRequested();
         }
         else
         {
         }
     }, false);
     ScreenshotReady_t.Install((ScreenshotReady_t x) => {
         if (x.Result == Result.OK)
         {
             Action <Screenshot> onScreenshotReady = SteamScreenshots.OnScreenshotReady;
             if (onScreenshotReady != null)
             {
                 onScreenshotReady(new Screenshot()
                 {
                     Value = x.Local
                 });
             }
             else
             {
             }
         }
         else
         {
             Action <Result> onScreenshotFailed = SteamScreenshots.OnScreenshotFailed;
             if (onScreenshotFailed != null)
             {
                 onScreenshotFailed(x.Result);
             }
             else
             {
             }
         }
     }, false);
 }
	void OnScreenshotRequested(ScreenshotRequested_t pCallback) {
		Debug.Log("[" + ScreenshotRequested_t.k_iCallback + " - ScreenshotRequested]");
	}