Пример #1
0
        TextureManager _textureManager; // 纹理控制器

        #endregion Fields

        #region Constructors

        public GameMenuState(StateSystem sys, TextureManager _t, SoundManagerEx _s , Form1 form = null)
        {
            _system = sys;
            _textureManager = _t;
            soundmanager = _s;
            backgroundImage = new BackGround(_t, 0);        //背景更改为0级(最底层)
            option = new Option(_t, _s , backgroundImage , 10); //10级,最顶层
            if(form !=null)
            this.form = form;
        }
Пример #2
0
        Form1 form;                                 // 此状态具备管理窗体的权限

        public GameMenuState(StateSystem sys, TextureManager _t, SoundManagerEx _s, Form1 form = null)
        {
            _system         = sys;
            _textureManager = _t;
            soundmanager    = _s;
            backgroundImage = new BackGround(_t, 0);                   //背景更改为0级(最底层)
            option          = new Option(_t, _s, backgroundImage, 10); //10级,最顶层
            if (form != null)
            {
                this.form = form;
            }
        }
Пример #3
0
        public AboutLura(TextureManager textureManager, SoundManagerEx sd)
        {
            _textureManager = textureManager;
            soundmanager    = sd;

            _testSprite.Texture = _textureManager.Get("lura1");
            _testSprite.SetWidth(512);
            _testSprite.SetHeight(512);

            _testSprite.SetPosition(new Vector(0, 0, 0));

            // soundmanager.Play("rj");
        }
Пример #4
0
        public AboutLura(TextureManager textureManager , SoundManagerEx sd)
        {
            _textureManager = textureManager;
            soundmanager = sd;

            _testSprite.Texture = _textureManager.Get("lura1");
            _testSprite.SetWidth(512);
            _testSprite.SetHeight(512);

            _testSprite.SetPosition(new Vector(0, 0, 0));

               // soundmanager.Play("rj");
        }
Пример #5
0
        public Stage1State(StateSystem system, TextureManager texturemanager, SoundManagerEx soundmanager, Form1 form = null)
        {
            _system         = system;
            _textureManager = texturemanager;
            _soundmanager   = soundmanager;
            if (form != null)
            {
                this.form = form;
            }

            GamePlayer          = new Player();
            Datas.CurrentPlayer = GamePlayer;

            gameview = new GameView(texturemanager, soundmanager, 5, GamePlayer);         //中间层着色,注册角色
            GamePlayer.RegisteredRCharactors(Datas.Charactors[Datas.Fore_People_Select],
                                             Datas.Charactors[Datas.Fore_People_Select]); //  Form1.Charactors[Datas.Back_People_Select]);
            GamePlayer.Position.Y  = 30;
            GamePlayer.RenderSpeed = 0.075f;                                              //人物帧动画渲染速度

            foretable = new ForeTable(texturemanager, 10);                                //最前层着色

            foretable.HighScores   = 0;
            foretable.Power        = 0;
            foretable.Graze        = 0;
            foretable.CurrentPoint = 0;
            foretable.LevelPoint   = 1550;
            foretable.CurrentTims  = 0;
            foretable.TotleTims    = 6400;
            foretable.GameLevel    = 1;

            Logo         = new Sprite();
            Logo.Texture = texturemanager.Get("logo1");
            Logo.SetWidth(192);
            Logo.SetHeight(192);
            Logo.SetPosition(210, -130);

            test = new Extra.VariableSprite();
            test.BindSprite(Logo);
            test.SetAttribute(210, -130, 0, 192, 192);

            fonc       = new FontAciHuaKang(texturemanager);
            TextWriter = new FontWriterTool(fonc);
        }
Пример #6
0
        StateSystem _system; // 状态机

        #endregion Fields

        #region Constructors

        public Stage1State(StateSystem system , TextureManager texturemanager , SoundManagerEx soundmanager ,Form1 form = null)
        {
            _system = system;
            _textureManager = texturemanager;
            _soundmanager = soundmanager;
            if(form != null)
            this.form = form;

            GamePlayer = new Player();
            Datas.CurrentPlayer = GamePlayer;

            gameview = new GameView(texturemanager, soundmanager, 5 , GamePlayer); //中间层着色,注册角色
            GamePlayer.RegisteredRCharactors(Datas.Charactors[Datas.Fore_People_Select],
              Datas.Charactors[Datas.Fore_People_Select]);//  Form1.Charactors[Datas.Back_People_Select]);
            GamePlayer.Position.Y = 30;
            GamePlayer.RenderSpeed = 0.075f;                            //人物帧动画渲染速度

            foretable = new ForeTable(texturemanager, 10);          //最前层着色

            foretable.HighScores = 0;
            foretable.Power = 0;
            foretable.Graze = 0;
            foretable.CurrentPoint = 0;
            foretable.LevelPoint = 1550;
            foretable.CurrentTims = 0;
            foretable.TotleTims = 6400;
            foretable.GameLevel = 1;

            Logo = new Sprite();
            Logo.Texture = texturemanager.Get("logo1");
            Logo.SetWidth(192);
            Logo.SetHeight(192);
            Logo.SetPosition(210, -130);

            test = new Extra.VariableSprite();
            test.BindSprite(Logo);
            test.SetAttribute(210, -130, 0, 192, 192);

            fonc = new FontAciHuaKang(texturemanager);
            TextWriter = new FontWriterTool(fonc);
        }