Exemple #1
0
 public LevelSystem(LoderGame game, SystemManager systemManager, EntityManager entityManager)
 {
     _game = game;
     _systemManager = systemManager;
     _entityManager = entityManager;
     _scriptManager = _game.scriptManager;
     //_regionGoals = new Dictionary<int, Goal>();
     //_eventGoals = new Dictionary<GameEventType, Dictionary<int, Goal>>();
     //_completedGoals = new Dictionary<int, Goal>();
     _levelBoundaries = new Dictionary<string, AABB>();
     _fallbackLevelBoundaries = new Dictionary<string, AABB>();
     _boundaryMargin = new Vector2(50f, 50f);
     _levelsData = new Dictionary<string, XElement>();
     _firstPassEntities = new Dictionary<string, List<XElement>>();
     _secondPassEntities = new Dictionary<string, List<XElement>>();
     _thirdPassEntities = new Dictionary<string, List<XElement>>();
     _numEntities = new Dictionary<string, int>();
     _numEntitiesProcessed = new Dictionary<string, int>();
     _backgrounds = new Dictionary<string, Background>();
     _finishedLoading = new Dictionary<string, bool>();
     _spawnPositions = new Dictionary<string, Vector2>();
     _loadedLevels = new List<string>();
 }
Exemple #2
0
        protected override void Initialize()
        {
            Logger.log("LoderGame.Initialize method started.");

            _systemManager = new SystemManager();
            _entityManager = new EntityManager(_systemManager);
            _scriptManager = new ScriptManager(_systemManager, _entityManager);
            _animationManager = new AnimationManager(this);

            base.Initialize();

            _screenSystem = new ScreenSystem(_systemManager, _spriteBatch);
            _systemManager.add(_screenSystem, -1);
            _loadingScreen = new LoadingScreen(this);

            DataManager.initialize(this, _systemManager, _entityManager);
            DataManager.loadGameSettings();
            applyDisplaySettings();

            Logger.log("LoderGame.Initialize method finished.");
        }