public static void LoadProjectContent(GameProject project, GraphicsDevice device)
        {
            if (project != null)
            {
                LoadMapObjectSprites(project, device);

                LoadTilesets(project, device);

                //LoadMapContent(project);
            }
        }
        public static void LoadTilesets(GameProject project, GraphicsDevice device)
        {
            var timeLog = new TimeLog();

            if (project.Tilesets != null)
            {
                foreach (Tileset set in project.Tilesets)
                {
                    set.LoadTexture(device);
                }
            }
            timeLog.Log("load tilesets");
        }
        public static void LoadMapObjectSprites(GameProject project, GraphicsDevice device)
        {
            var timeLog = new TimeLog();

            if (project.MapObjects != null)
            {
                foreach (var obj in project.MapObjects)
                {
                    if (!string.IsNullOrEmpty(obj.SpriteInfo.Name))
                    {
                        var texture = ContentLoader.LoadTexture(device, "Sprites/Objects/" + obj.SpriteInfo.Name);
                        obj.Animation = new SpriteAnimation(texture, 100, 1);
                        obj.Animation.Origin = obj.Origin;
                    }
                }
            }

            timeLog.Log("load sprites");
        }
        private void NewProject(string name)
        {
            var p = new GameProject()
            {
                ProjectName = name
            };

            p.Save();

            LoadProject(p.ProjectName);
        }
        protected override void LoadContent()
        {
            Fonts.Load(Content);

            GameGraphics.Load(GraphicsDevice);

            spriteBatch = new SpriteBatch(GraphicsDevice);

            //Item.AllItems = Item.LoadAll();
            //Skill.AllSkills = Skill.GetAllSkills(Content);

            LoadCharacterClasses();

            GameProject = GameProject.Load(projectName);
            LoadSpriteCollection(GameProject.SpriteConfigurations);

            Characters = new Dictionary<CharacterClass, Character.Character>();
            Scenes = new Dictionary<GameState, Scene>();

            Scenes[GameState.MainMenu] = new MainMenuScene(this);
            Scenes[GameState.LoadGame] = new LoadGameScene(this);
            Scenes[GameState.Help] = new HelpScene(this);
            Scenes[GameState.GameStatsHelp] = new GameStatsHelpScene(this);
            Scenes[GameState.GameStarted] = new GameStartedScene(this);
            Scenes[GameState.NewGame] = new NewGameScene(this);

            State = GameState.MainMenu;
        }