Пример #1
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);
        }
Пример #2
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);
        }