コード例 #1
0
ファイル: Level.cs プロジェクト: iq110/csharpgameprogramming
        public Level(Input input, TextureManager textureManager, PersistantGameData gameData)
        {
            _input = input;
            _gameData = gameData;
            _textureManager = textureManager;

            _background = new ScrollingBackground(textureManager.Get("background"));
            _background.SetScale(2, 2);
            _background.Speed = 0.15f;

            _backgroundLayer = new ScrollingBackground(textureManager.Get("background_layer_1"));
            _backgroundLayer.Speed = 0.1f;
            _backgroundLayer.SetScale(2.0, 2.0);


            _playerCharacter = new PlayerCharacter(_textureManager);
        }
コード例 #2
0
        public Level(Input input, TextureManager textureManager, PersistantGameData gameData)
        {
            _input          = input;
            _gameData       = gameData;
            _textureManager = textureManager;

            _background = new ScrollingBackground(textureManager.Get("background"));
            _background.SetScale(2, 2);
            _background.Speed = 0.15f;

            _backgroundLayer       = new ScrollingBackground(textureManager.Get("background_layer_1"));
            _backgroundLayer.Speed = 0.1f;
            _backgroundLayer.SetScale(2.0, 2.0);


            _playerCharacter = new PlayerCharacter(_textureManager);
        }