Пример #1
0
        private static GameScreen MakePhysicistScreen(string filePath)
        {
            PhysicistGameScreen screen     = null;
            PhysicistGameScreen tempScreen = null;

            try
            {
                tempScreen = new PhysicistGameScreen("MainScreen", filePath);
                screen     = tempScreen;
                tempScreen = null;
            }
            finally
            {
                if (tempScreen != null)
                {
                    tempScreen.Dispose();
                }
            }

            return(screen);
        }
Пример #2
0
        private static GameScreen MakePhysicistScreen(string filePath)
        {
            PhysicistGameScreen screen = null;
            PhysicistGameScreen tempScreen = null;

            try
            {
                tempScreen = new PhysicistGameScreen("MainScreen", filePath);
                screen = tempScreen;
                tempScreen = null;
            }
            finally
            {
                if (tempScreen != null)
                {
                    tempScreen.Dispose();
                }
            }

            return screen;
        }