示例#1
0
        public EntityManager(Game mGame, string[] mGroups)
        {
            Debug.Assert(mGame != null);

            Game = mGame;
            Groups = mGroups;
            Entities = new List<Entity>();
            EntitiesToUpdate = new List<Entity>();
            EntitiesToDrawSorted = new List<Entity>();

            EntityDictionary = new Dictionary<string, List<Entity>>();
            foreach (var group in mGroups) EntityDictionary.Add(group, new List<Entity>());
        }
示例#2
0
        public void SetGame(Game mGame)
        {
            _game = mGame;
            _game.GameWindow = this;

            Camera = new Camera(this, _width, _height);

            _hasFocus = true;
            _running = true;
        }