Difference between revisions of "Example Code"

From Alpha Archive Wiki
Jump to navigation Jump to search
(Created page with "===If you want to pause the game when you press the guide button:=== if (X360Core.IsSystemUIVisible() == true) { Time.timeScale = 0; }...")
 
 
Line 1: Line 1:
 +
==Pause Game With Guide Button==
 
===If you want to pause the game when you press the guide button:===
 
===If you want to pause the game when you press the guide button:===
 
         if (X360Core.IsSystemUIVisible() == true)
 
         if (X360Core.IsSystemUIVisible() == true)
Line 8: Line 9:
 
             Time.timeScale = 1;
 
             Time.timeScale = 1;
 
         }
 
         }
 +
 +
 +
==Example Code 2==

Latest revision as of 02:06, 8 June 2020

Pause Game With Guide Button

If you want to pause the game when you press the guide button:

       if (X360Core.IsSystemUIVisible() == true)
       {
           Time.timeScale = 0;
       }
       else if (X360Core.IsSystemUIVisible() == false)
       {
           Time.timeScale = 1;
       }


Example Code 2