GetObjects() публичный Метод

Goes through all the entities and finds all of the ones that are Static, or physics(Dynamic maybe in the future) Creates and returns them using the data found in the xml file
public GetObjects ( PhysicsEnvironment &environment ) : List
environment PhysicsEnvironment Environment that these items exist in
Результат List
Пример #1
0
        /// <summary>
        /// Loads the level from the content manager
        /// </summary>
        /// <param name="content">Content Manager to load from</param>
        public void Load(ContentManager content)
        {
            _mObjects.Clear();
            Reset();

            var importer = new Importer(content);
            importer.ImportLevel(this);

            _mPlayer = new Player(content, ref _mPhysicsEnvironment,
                _mControls, .8f, EntityInfo.CreatePlayerInfo(GridSpace.GetGridCoord(StartingPoint)));

            _mObjects.Add(_mPlayer);
            _mObjects.AddRange(importer.GetObjects(ref _mPhysicsEnvironment));

            _mPlayerEnd = importer.GetPlayerEnd();
            if (_mPlayerEnd != null)
                _mObjects.Add(_mPlayerEnd);

            _mObjects.AddRange(importer.GetWalls(this).Cast<GameObject>());

            _mRails = importer.GetRails();

            _mTrigger.AddRange(importer.GetTriggers());

            PrepareCollisionMatrix();

            MNumCollected = 0;
            MNumCollectable = 0;

            //Clear the collection lists
            _mCollected.Clear();
            _mRemoveCollected.Clear();

            foreach (var gObject in _mObjects)
            {
                if (gObject.CollisionType == XmlKeys.Collectable)
                    MNumCollectable++;
            }
        }