Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. public class F84Globals
  2. {
  3.     private static F84Globals instance;
  4.  
  5.     public F84Globals()
  6.     {
  7.         if (instance != null)
  8.         {
  9.             Debug.LogError("Cannot have two instances of F84Globals. Aborting.");
  10.             return;
  11.         }
  12.  
  13.         instance = this;
  14.     }
  15.  
  16.     public static F84Globals Instance
  17.     {
  18.         get
  19.         {
  20.             if (instance == null)
  21.             {
  22.                 new F84Globals();
  23.             }
  24.  
  25.             return instance;
  26.         }
  27.     }
  28.  
  29.     Stats GlobalStats;
  30.     Stats SessionStats;
  31.  
  32.     // show the level selection stuff
  33.     bool bShowTitle = true;
  34.     public bool ShowTitle
  35.     {
  36.         get
  37.         {
  38.             return instance.bShowTitle;
  39.         }
  40.         set
  41.         {
  42.             instance.bShowTitle = value;
  43.         }
  44.     }
  45.  
  46.     // handle win related stuff
  47.     public void Win()
  48.     {
  49.         bShowTitle = false;
  50.         Application.LoadLevel("Start Screen");
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement