示例#1
0
 public void Dispose()
 {
     if (GameContents != null)
     {
         GameContents.Dispose();
     }
 }
示例#2
0
        private void Load()
        {
            Game = new Game(GameContents.GetFile(Resources.GameConfig));
            ErrorCollection.AddRange(Game.ErrorCollection);

            if (GameContents.GetFile(Resources.UpdateConfig) != null)
            {
                Update = new Update(Game, GameContents.GetFile(Resources.UpdateConfig));
                ErrorCollection.AddRange(Update.ErrorCollection);
            }
        }
示例#3
0
        private void ValidateGameStructure()
        {
            if (GameContents.GetFile(Resources.GameConfig) == null)
            {
                ErrorCollection.Add("No Game configuration found (expected \"" + Resources.GameConfig + "\")");
            }

            IsUpdate = GameContents.GetFile(Resources.UpdateConfig) != null;

            if (!IsUpdate && GameContents.GetFile(Resources.ContentDir) == null)
            {
                ErrorCollection.Add("No content directory found");
            }

            if (!IsUpdate && GameContents.GetFile(Resources.BinDir) == null)
            {
                ErrorCollection.Add("No bin directory found");
            }
        }