public MainMenu(ContentManager content, string texturePrefix, string[] textures, Vector3[] positions, Vector2[] sizes) { _ButtonList = new List<PlanarButton>(); for(int i=0; i<textures.Length; i++) { PlanarButton planarButtonTemp = new PlanarButton(content, texturePrefix + textures[i], sizes[i], _Scale, positions[i], Matrix.Identity); planarButtonTemp.EnableAnimation(false); _ButtonList.Add(planarButtonTemp); } _nButton = _ButtonList.Count; this._MainMenuVideoPlayer = new MyVideoPlayer(); this._MainMenuVideoPlayer.SetVideoToPlay(BACKGROUND_VIDEO, content); _focusButton = 0; this._Title = new PlanarModel(content, TITLE, TITLE_SIZE, this._Scale, TITLE_POSITION, Matrix.Identity); this._Title.IsAnimate = false; }
public OptionMenu(ContentManager content, string texturePrefix, string[] textures, Vector3[] positions, Vector2[] sizes) { _ButtonList = new List<PlanarButton>(); _PlanarTitle = new PlanarModel(content, texturePrefix + textures[0], sizes[0], _Scale, positions[0], Matrix.Identity); this._PlanarTitle.IsAnimate = false; for(int i=1; i<textures.Length-1; i++) { PlanarButton planarButtonTemp = new PlanarButton(content, texturePrefix + textures[i], sizes[i], _Scale, positions[i], Matrix.Identity); planarButtonTemp.EnableAnimation(false); _ButtonList.Add(planarButtonTemp); } _PlanarPartOfBar = new PlanarModel(content, texturePrefix + textures[textures.Length - 1], sizes[textures.Length - 1], _Scale, positions[textures.Length - 1], Matrix.Identity); _PlanarPartOfBar.IsAnimate = false; _OriginalPositionBar = positions[textures.Length - 1]; _nButton = _ButtonList.Count; this._MainMenuVideoPlayer = new MyVideoPlayer(); this._MainMenuVideoPlayer.SetVideoToPlay(backgroundVideo, content); //Khoi tao _focusButton = 0; _volume = 3; _difficuty = 3; }