Пример #1
0
        /// <summary>
        /// Creates a new level screen
        /// </summary>
        /// <param name="game">Game to bind to</param>
        /// <param name="data">Level data</param>
        public LevelScreen(Game game, Level data)
            : base(game)
        {
            _levelData = data;
            _camera = new Camera2D(game);
            _background = new Layer(game, _camera);
            _foreground = new Layer(game, _camera);
            _overlay = new Layer(game);

            this.Exited += new EventHandler(LevelScreen_Exited);
        }
Пример #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="game"></param>
 /// <param name="camera"></param>
 public Layer(Game game, Camera2D camera)
     : this(game)
 {
     this.Camera = camera;
 }