MrGravity.Level.Level C# (CSharp) Method

Level() public method

Initializes a new instance of the Level class.
public Level ( String filepath, IControlScheme controls, Viewport viewport ) : System
filepath String
controls IControlScheme The controls scheme
viewport Microsoft.Xna.Framework.Graphics.Viewport The viewport for the cameras
return System
        public Level(String filepath, IControlScheme controls, Viewport viewport)
        {
            Filepath = filepath;
            _mControls = controls;

            MCam = new Camera(viewport);

            _mBounds = viewport.Bounds;
            _mScreenRect = viewport.TitleSafeArea;

            _mRails = new List<EntityInfo>();

            _mObjects = new List<GameObject>();
            _mCollected = new List<GameObject>();
            _mRemoveCollected = new List<GameObject>();
            _mActiveAnimations = new Dictionary<Vector2, AnimatedSprite>();
            _mTrigger = new List<Trigger>();
            _mPhysicsEnvironment = new PhysicsEnvironment();

            _mTimerStar = _mDeathStar = _mTimerStar = 0;

            _bw = new BackgroundWorker { WorkerReportsProgress = false, WorkerSupportsCancellation = false };
            _bw.DoWork += UpdateParticles;
        }