コード例 #1
0
        public static void StartNewSession(ScreenManager screenManager)
        {
            if (screenManager == null)
            {
                throw new ArgumentNullException("screenManager");
            }

            // End any existing session
            EndSession();

            // Create a new singleton
            singleton = new ChronosEngine(screenManager);
        }
コード例 #2
0
 public static void EndSession()
 {
     // End the gameplay
     // -- store the gameplay session, for re-entrance
     if (singleton != null)
     {
         // clear the singleton
         singleton = null;
     }
 }