예제 #1
0
 /// <summary>
 /// Returns the SettingsFileManager instance, or creates it if it doesn't exist yet.
 /// If a new SettingsFileManager instance gets created, the game settings will automatically be read from the settings file.
 /// If the settings file doesn't exist yet, it is created.
 /// Do not attempt to create your own SettingsFileManager instance. Use this method instead.
 /// </summary>
 /// <returns>The SettingsFileManager instance you should use.</returns>
 public static SettingsFileManager GetSettingsFileManager()
 {
     if (instance == null)
     {
         instance = new SettingsFileManager("setti.ngs");
     }
     return instance;
 }
예제 #2
0
        public Game1()
        {
            sfm = SettingsFileManager.GetSettingsFileManager();

            InitializeWindow();

            Content.RootDirectory = "Content";
            this.IsMouseVisible = true;

            cHandler = new CommandHandler(this);
            stopwatch = new Stopwatch();
            universe = new Universe();
            listener = new InputListener();

            startPoint = new Vector2();
            startPosition = new Vector2();
        }