Esempio n. 1
0
        //EnemyManager _enemyManager;
        public Level(Input input, TextureManager textureManager, PersistantGameData gameData, Engine.Font generalFont, Engine.Font titleFont, Size windowSize)
        {
            //_testSprite.Texture = textureManager.Get("explosion");
            //_testSprite.SetAnimation(4, 4);

            _input          = input;
            _gameData       = gameData;
            _textureManager = textureManager;
            _effectsManager = new EffectsManager(_textureManager);

            _background = new Background(textureManager.Get("background"));
            //_background.Speed = 0.15f;
            widthScale2  = _windowSize.Width / 900.0;
            heightScale2 = _windowSize.Height / 695.0;
            _background.SetScale(2.0, 2.0);

            //_backgroundLayer = new Background(textureManager.Get("background_layer_1"));
            //_backgroundLayer.Speed = 0.1f;
            //_backgroundLayer.SetScale(2.0, 2.0);
            m_ChessBoard = Form1.InitChessBoard;
            _chessBoard  = new ChessBoard(_textureManager, _moveChessManager);

            //_system = system;

            //_input = input;

            _generalFont   = generalFont;
            _titleFont     = titleFont;
            settingChecked = SettingMenu();
            Option  optionChecked = OptionMenu();
            Engines engineChecked = EngineMenu();

            _enginemenu._rvdisable = true;

            _optiontitle = new Text("选项", _titleFont);
            _optiontitle.SetColor(new Color(0, 0, 0, 1));
            //Center on the x and place somewhere near the top
            _optiontitle.SetPosition(-_optiontitle.Width / 2 - 450, 300);

            //EngineMenu();
            _optiontitle = new Text("引擎", _titleFont);
            _optiontitle.SetColor(new Color(0, 0, 0, 1));
            // Center on the x and place somewhere near the top
            _optiontitle.SetPosition(-_optiontitle.Width / 2 + 450, 300);

            //_enemyManager = new EnemyManager(_textureManager, _effectsManager, _bulletManager, _playerCharacter, -1300);
        }
        public StartMenuState(Engine.Font titleFont, Engine.Font generalFont, Input input, StateSystem system, TextureManager textureManager, Size windowSize)
        {
            _system = system;

            _input          = input;
            _generalFont    = generalFont;
            _textureManager = textureManager;
            _windowSize     = windowSize;
            _effectsManager = new EffectsManager(_textureManager);
            InitializeMenu();
            _backgroundLayer = new Background(textureManager.Get("background_layer_1"));
            //_background.Speed = 0.15f;
            widthScale  = _windowSize.Width / 500.0;
            heightScale = _windowSize.Height / 375.0;
            _backgroundLayer.SetScale(widthScale, heightScale);
            _title = new Text("中国象棋", titleFont);
            _title.SetColor(new Color(0, 0, 0, 1));
            // Center on the x and place somewhere near the top
            _title.SetPosition(-_title.Width / 2, 300);
        }