Example #1
0
        float speed2 = 200; //靠近玩家时自动靠近的速度

        #endregion Fields

        #region Constructors

        //构造函数都需要继承基类构造函数
        public BoomPoint(TextureManager texturemanager, float X, float Y)
            : base()
        {
            this.Type = Item.Boom_Point;
            //确定弹射范围
            Position.X = X; Position.Y = Y;
            OriPosition = new Vector2D(Position.X, Position.Y);
            breakPosition = new Vector2D(Direction.X * breakLength + Position.X, Direction.Y * breakLength + Position.Y);

            //正常状态
            Texture texture = texturemanager.Get("Ef_etama2");
            sprite = new Sprite();
            sprite.Texture = texture;
            sprite.SetHeight(16);
            sprite.SetWidth(16);
            sprite.SetUVs(6*per_256, 8 * per_256, 8 * per_256, 10 * per_256);

            //顶部状态(三角形形态)
            Texture texture2 = texturemanager.Get("Ef_etama2");
            littleState = new Sprite();
            littleState.Texture = texture2;
            littleState.SetWidth(16);
            littleState.SetHeight(16);
            littleState.SetUVs(22 * per_256, 8 * per_256, 24 * per_256, 10 * per_256);
        }
Example #2
0
 public RedBox(TextureManager t)
 {
     name = "BlueBox";
     sprite= new Sprite();
      sprite.Texture = t.Get("Player2");
      sprite.SetHeight(16);
      sprite.SetWidth(16);
      sprite.SetUVs(per_256,6,18,8,20);
 }
Example #3
0
 public BlueBox(TextureManager t)
 {
     name = "BlueBox";
     sprite= new Sprite();
      sprite.Texture = t.Get("Player2");
      sprite.SetHeight(32);
      sprite.SetWidth(32);
      sprite.SetUVs(0, 22 * per_256, 4 * per_256, 26 * per_256);
 }
Example #4
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;
        }
Example #5
0
        public DrawSpriteState(TextureManager textureManager)
        {
            _textureManager = textureManager;

            Texture texture = _textureManager.Get("huiye");
            height = 128;
            width = 128;

            halfheight = height / 2;
            halfwidth = width / 2;
        }
Example #6
0
        float width_max = 64; //最大宽度

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 爆炸特效
        /// </summary>
        /// <param name="texturemanager">纹理管理器</param>
        /// <param name="pos">绑定对象上的坐标组件</param>
        /// <param name="live_time">存活时间</param>
        /// <param name="min_r">特效半径最小大小</param>
        /// <param name="max_r">特效半径最大大小</param>
        public BreakOut_Blue(TextureManager texturemanager,Vector2D pos,int live_time = 15,float min_r=32,float max_r=64)
        {
            Pos_BindObject = pos;
            living_time = live_time;
            Texture texture = texturemanager.Get("Ef_etama2");
            sprite = new Sprite();
            sprite.Texture = texture;
            width = min_r; height = min_r;
            width_max = max_r; height_max = max_r;
            sprite.SetUVs(24 * per_256, 22 * per_256, 32 * per_256, 30 * per_256);
        }
Example #7
0
        public TextTestState(TextureManager textureManager)
        {
            _text.Texture = textureManager.Get("Font");
            _textFont = new TextFont(textureManager);
            spr = _textFont.GetAci("终");
            spr.SetPosition(-50, 50);
            spr.SetHeight(14);spr.SetWidth(14);

            _text.SetUVs(new Point(0.0547f*2, 0.0547f), new Point(0.0547f * 3, 0.0547f * 2));
            _text.SetWidth(14);
            _text.SetHeight(14);
        }
Example #8
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");
        }
Example #9
0
 public BlueCard(TextureManager _t)
 {
     Texture texture;
     texture = _t.Get("Player2");
     name = "BlueCard";
     sprite = new Sprite();
     sprite.Texture = texture;
     sprite.SetWidth(16);
     sprite.SetHeight(16);
     sprite.SetUVs(4 * per_256, 22 * per_256, 6 * per_256, 24 * per_256);
     sprite.SetColorUp(new Color(1, 1, 1, 0.5f));
     sprite.SetColorDown(new Color(1, 1, 1, 0.5f));
 }
Example #10
0
        public Stage01_EB01(TextureManager _t, Vector2D direction , Vector2D position,int color = 5)
        {
            texturemanager = _t;
            Direction.X = direction.X; Position.X = position.X;
            Direction.Y = direction.Y; Position.Y = position.Y;
            bulletbody = new BulletBodys.RoundB_B(_t, color);                        //敌机子弹皮肤(miniRice)
            speed = 100;
            BulletData bulletdata = new BulletData(Position , Direction , Scale , speed);
            contorler = new Entities.Controlors.DirectControler(bulletdata);      //选择直线控制器
            renderlevel = 0;

            //需要提前约定好
            MissTick = 61;
            MissRefresh = 60;
        }
Example #11
0
 public BlueButterfly(TextureManager texturemanager)
 {
     Texture texture = texturemanager.Get("enemys1");
     sprite = new Sprite();
     sprite.Texture = texture;
     sprite.SetWidth(32);
     sprite.SetHeight(32);
     multiSprite = new MultiSprite(sprite);
     multiSprite.changeinterval = 0.15f;
     RecTangleF[] rects = new RecTangleF[4];
     for (int i = 0; i < 4; i++)
     {
         rects[i] = new RecTangleF(16 * per_512 + i * per_512 * 4, 16 * per_512,
             16 * per_512 + (i + 1) * 4 * per_512, 20 * per_512);
     }
     multiSprite.RegeditState(0, rects);
     effect = new StartEffect_Red(Stage1State._textureManager);
 }
Example #12
0
        public DarkBlueLittleSprite(TextureManager texturemanager)
        {
            name = "DarkBlueLittleSprite";
            Texture texture = texturemanager.Get("enemy");
            sprite = new Sprite();
            sprite.Texture = texture;
            sprite.SetWidth(32);
            sprite.SetHeight(32);
            multiSprite = new MultiSprite(sprite);

            RecTangleF[] rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 4 * per_512 , 0,
                    (i + 1) * 4 * per_512, 4 * per_512);
            multiSprite.RegeditState(0, rects);      //将此rectangleF注册到0号state ,表示正面状态

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 4 * per_512, 4 * per_512,
                    (i + 1) * 4 * per_512, 8 * per_512);
            multiSprite.RegeditState(1, rects);      //将此rectangleF注册到1号state ,表示右侧渐动的状态

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 4 * per_512, 8 * per_512,
                    (i + 1) * 4 * per_512, 12 * per_512);
            multiSprite.RegeditState(2, rects);      //将此rectangleF注册到2号state ,表示右侧移动状态

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF((i + 1) * 4 * per_512, 4 * per_512,
                    i * 4 * per_512, 8 * per_512);
            multiSprite.RegeditState(3, rects);      //将此rectangleF注册到3号state ,表示左侧渐动的状态

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF((i + 1) * 4 * per_512, 8 * per_512,
                    i * 4 * per_512, 12 * per_512);
            multiSprite.RegeditState(4, rects);      //将此rectangleF注册到4号state ,表示左侧移动状态
            multiSprite.RegeditCollection(1, 2);     //将1号动画连接到2号动画上
            multiSprite.RegeditCollection(3, 4);     //将3号动画连接到4号动画上
            multiSprite.State = 0;                   //将状态切换为0号state
            multiSprite.changeinterval = 0.1f;
        }
Example #13
0
        public TestSpriteClassSate(TextureManager textureManager)
        {
            _textureManager = textureManager;                    //接手纹理管理器
            _testSprite.Texture = _textureManager.Get("Font");   //设定精灵的纹理
            _testSprite.SetHeight(256 * 0.5f);           //不知什么原因,不能从纹理处获取图片的高度
                                                         //而宽度在帮顶纹理时就能够获得
            _testSprite2.Texture = _textureManager.Get("charactor1");
              //  _testSprite2.SetPosition(0, 100);
            _testSprite2.SetColor(new Color(1, 1, 1, 0.9f));// Alpha值会影响图片整个的透明度,非常实用,可以实现图像渐变的效果
            _testSprite2.SetHeight(128);

            _testSprite3.Texture = _textureManager.Get("Font");
            int g = _testSprite3.Texture.ID;
            _testSprite3.SetColor(new Color(1, 1, 1, 0.7f));// Alpha值会影响图片整个的透明度,非常实用,可以实现图像渐变的效果
            _testSprite3.SetHeight(128);

            _testSprite4.Texture = _textureManager.Get("mbit1");
            _testSprite4.SetColor(new Color(1, 1, 1, 0.5f));// Alpha值会影响图片整个的透明度,非常实用,可以实现图像渐变的效果
            _testSprite4.SetHeight(128);

            _testSprite5.Texture = _textureManager.Get("mbit1");
            _testSprite5.SetColor(new Color(1, 1, 1, 0.3f));// Alpha值会影响图片整个的透明度,非常实用,可以实现图像渐变的效果
            _testSprite5.SetHeight(128);
        }
Example #14
0
        public Yukari(TextureManager texturemanager)
        {
            name = "YuKaRi";
            Texture texture = texturemanager.Get("Player2");
            sprite = new Sprite();
            sprite.Texture = texture;
            sprite.SetWidth(32);
            sprite.SetHeight(48);

            multiSprite = new MultiSprite(sprite);

            RecTangleF[] rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(4 * 4 * per_256 + i * 4 * per_256, 0,
                    4 * 4 * per_256 + 4 * per_256 + i * 4 * per_256, 6 * per_256);
            multiSprite.RegeditState(0, rects);      //将此rectangleF注册到0号state

            rects = new RecTangleF[3];
            for (int i = 0; i < 3; i++)
                rects[i] = new RecTangleF(i * 4 * per_256, 12 * per_256,
                    4 * per_256 + i * 4 * per_256, 18 * per_256);
            multiSprite.RegeditState(1, rects);      //将此rectangleF注册到1号state (过渡移动)

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(12 * per_256 + i * 4 * per_256, 12 * per_256,
                   12 * per_256 + 4 * per_256 + i * 4 * per_256, 18 * per_256);
            multiSprite.RegeditState(2, rects);      //将此rectangleF注册到2号state (移动)

            rects = new RecTangleF[3];
            for (int i = 0; i < 3; i++)
                rects[i] = new RecTangleF(4 * per_256 + i * 4 * per_256, 12 * per_256,
                   i * 4 * per_256, 18 * per_256);
            multiSprite.RegeditState(3, rects);      //将此rectangleF注册到3号state (过渡移动,右)

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(12 * per_256 + 4 * per_256 + i * 4 * per_256, 12 * per_256,
                12 * per_256 + i * 4 * per_256, 18 * per_256);
            multiSprite.RegeditState(4, rects);      //将此rectangleF注册到4号state (移动)

            multiSprite.RegeditCollection(1, 2);     //将1号动画连接到2号动画上
            multiSprite.RegeditCollection(3, 4);     //将3号动画连接到4号动画上
            multiSprite.State = 0;                   //将状态切换为0号state
        }
Example #15
0
        public Wriggle(TextureManager texturemanager)
        {
            name = "Wriggle";
            Texture texture = texturemanager.Get("Wriggle");
            sprite = new Sprite();
            sprite.Texture = texture;
            sprite.SetWidth(32);
            sprite.SetHeight(42);
            sprite.SetColor(new Color(1, 1, 1, 0.2f));

            multiSprite = new MultiSprite(sprite);

            float offset = 0.01f;

            RecTangleF[] rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 8 * per_256, per_256, (i + 1) * 8 * per_256 - offset, 13 * per_256);
            multiSprite.RegeditState(0, rects);      //将此rectangleF注册到0号state

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 8 * per_256, per_256, (i + 1) * 8 * per_256 - offset, 13 * per_256);
            multiSprite.RegeditState(1, rects);      //将此rectangleF注册到1号state (过渡移动)

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 8 * per_256, per_256, (i + 1) * 8 * per_256 - offset, 13 * per_256);
            multiSprite.RegeditState(2, rects);      //将此rectangleF注册到2号state (移动)

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 8 * per_256, per_256, (i + 1) * 8 * per_256 - offset, 13 * per_256);
            multiSprite.RegeditState(3, rects);      //将此rectangleF注册到3号state (过渡移动,右)

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(i * 8 * per_256, per_256, (i + 1) * 8 * per_256 - offset, 13 * per_256);
            multiSprite.RegeditState(4, rects);      //将此rectangleF注册到4号state (移动)

            multiSprite.RegeditCollection(1, 2);     //将1号动画连接到2号动画上
            multiSprite.RegeditCollection(3, 4);     //将3号动画连接到4号动画上
            multiSprite.State = 0;                   //将状态切换为3号state

            InitComponents();
        }
Example #16
0
        public ReiMu(TextureManager texturemanager)
        {
            this.texturemanager = texturemanager;
            name = "ReiMu";
            Texture texture = texturemanager.Get("Player2");
            sprite = new Sprite();
            sprite.Texture = texture;
            sprite.SetWidth(32);
            sprite.SetHeight(48);
            sprite.SetColor(new Color(1, 1, 1, 0.2f));

            multiSprite = new MultiSprite(sprite);

            RecTangleF[] rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(0 + i * 4 * per_256, 0, 4 * per_256 + i * 4 * per_256, 6 * per_256);
            multiSprite.RegeditState(0, rects);      //将此rectangleF注册到0号state

            rects = new RecTangleF[3];
            for (int i = 0; i < 3; i++)
                rects[i] = new RecTangleF(i * 4 * per_256, 6 * per_256,
                    4 * per_256 + i * 4 * per_256, 12 * per_256);
            multiSprite.RegeditState(1, rects);      //将此rectangleF注册到1号state (过渡移动)

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(12 * per_256 + i * 4 * per_256, 6 * per_256,
                   12 * per_256 + 4 * per_256 + i * 4 * per_256, 12 * per_256);
            multiSprite.RegeditState(2, rects);      //将此rectangleF注册到2号state (移动)

            rects = new RecTangleF[3];
            for (int i = 0; i < 3; i++)
                rects[i] = new RecTangleF(4 * per_256 + i * 4 * per_256, 6 * per_256,
                   i * 4 * per_256, 12 * per_256);
            multiSprite.RegeditState(3, rects);      //将此rectangleF注册到3号state (过渡移动,右)

            rects = new RecTangleF[4];
            for (int i = 0; i < 4; i++)
                rects[i] = new RecTangleF(12 * per_256 + 4 * per_256 + i * 4 * per_256, 6 * per_256,
                12 * per_256 + i * 4 * per_256, 12 * per_256);
            multiSprite.RegeditState(4, rects);      //将此rectangleF注册到4号state (移动)

            multiSprite.RegeditCollection(1, 2);     //将1号动画连接到2号动画上
            multiSprite.RegeditCollection(3, 4);     //将3号动画连接到4号动画上
            multiSprite.State = 0;                   //将状态切换为3号state

            InitComponents();
        }
Example #17
0
 public ScoreItem(TextureManager textureManager)
 {
     score_number = new Score_Number(textureManager);
 }
Example #18
0
        public MissPoint(TextureManager texturemanager, double X, double Y,Vector2D dir,int score = 100)
        {
            //确定类型
            this.Type = Item.Miss_Point;
            working = true;

            //确定弹射范围
            Position.X = X; Position.Y = Y;
            if (dir.Y < 0)
                dir.Y = -dir.Y;
            if (dir.X >= 0)
            {
                double rad = dir.GetAngle();
                if (rad > 60)
                    rad = 60;
                direction = new Vector2D(0, 1);
                direction.rotate((float)(Datas.LooselyRandom.NextDouble() * (rad - 2*randDomain) + randDomain));
            }
            else
            {
                double rad = dir.GetAngle();
                rad = 360 - rad;
                if (rad > 60)
                    rad = 60;
                direction = new Vector2D(0, 1);
                direction.rotate(-((float)(Datas.LooselyRandom.NextDouble() * (rad - 2 * randDomain) + randDomain)));
            }

            speed_right = speed_totle * direction.X;
            speed_up = speed_totle * direction.Y;

            double offset_x = Center_Distance * direction.X;
            double offset_y = Center_Distance * direction.Y;
            Position.X += offset_x;
            Position.Y += offset_y;

            offset_x = Datas.LooselyRandom.NextDouble() * 2 *randFireDomain - randFireDomain;
            Position.X += offset_x;

            Texture texture = texturemanager.Get("Ef_etama2");
            sprite = new Sprite();
            sprite.Texture = texture;
            sprite.SetHeight(16);
            sprite.SetWidth(16);
            sprite.SetUVs(14 * per_256, 8 * per_256, 16 * per_256, 10 * per_256);

            //保存了MissPoint的一些必要信息
            ItemData = new itemdata.MissPoint(score,3);
        }
Example #19
0
        Vector2D vct; //用于存放指向敌人的主方向

        #endregion Fields

        #region Constructors

        public Stage01_E01(TextureManager _texturemanager, float x, float y,bool _turnleft = false)
        {
            name = "Stage01_E01";
            texturemanager = _texturemanager;
            Position.X = x; Position.Y = y;
            enemybody = new DarkBlueLittleSprite(texturemanager);   //皮肤选择为DarkBlueLittleSprite
            enemybody.multiSprite.State = 0;                        //一开始先重置为一般状态
            hp = 1500;
            enemydata = new EnemyData(Position, Direction, Scale, 100);    //建立一个敌人数据,用于传递给行为控制器使用
            turnleft = _turnleft;
            controler = new Stage01_E01c(enemydata,turnleft);                        //建立一个专属的行为控制器
            renderlevel = 0;                                 //在敌人列表中置于最底层

            Break_ani = new BreakOut_Blue(_texturemanager, Position,20,16,64);       //爆炸动画
            breakParticle = new Particle.BreakPointsParticles(_texturemanager, 0);   //溅射粒子
            breakParticle.EnableVisibleLenth(true, 5);

            TCset fire01 = new TCset(50, 250);              //200-500帧第一阶段释放子弹
            fire01.Name = "fire01";
            commands.Add(fire01);                            //添加进任务队列
            TCset fire02 = new TCset(250, 400);              //500-580帧时进行旋转,并且进行加速
            fire02.Name = "fire02";
            commands.Add(fire02);
            TCset stop01 = new TCset(320, 340);              //中间过程停止发射(stop要置于fire等命令的后面)
            stop01.Name = "stop01";
            commands.Add(stop01);
        }
Example #20
0
        float _alpha; //那段时间的透明值

        #endregion Fields

        #region Constructors

        public ReimuBullet_Follow(TextureManager texturemanager, Vector2D direction)
        {
            bulletbody = new BlueCard(texturemanager);
            direction.Normalize();
            this.Direction.X = direction.X;
            this.Direction.Y = direction.Y;
            attack = 100;
            speed = 400;

            BlueEsc = (new BlueBox(texturemanager)).GetSprite() ;
        }
Example #21
0
        //构造函数都需要继承基类构造函数
        public GratePowerPoint(TextureManager texturemanager, double X, double Y)
            : base()
        {
            this.Type = Item.BigP_Point;
            //确定弹射范围
            Position.X = X; Position.Y = Y;
            OriPosition = new Vector2D(Position.X, Position.Y);
            breakPosition = new Vector2D(Direction.X * breakLength + Position.X, Direction.Y * breakLength + Position.Y);

            //正常状态
            Texture texture = texturemanager.Get("Ef_etama2");
            sprite = new Sprite();
            sprite.Texture = texture;
            sprite.SetHeight(16);
            sprite.SetWidth(16);
            sprite.SetUVs(4.1f * per_256, 8 * per_256, 6 * per_256, 9.9f * per_256);

            //顶部状态(三角形形态)
            Texture texture2 = texturemanager.Get("Ef_etama2");
            littleState = new Sprite();
            littleState.Texture = texture2;
            littleState.SetWidth(16);
            littleState.SetHeight(16);
            littleState.SetUVs(20 * per_256, 8 * per_256, 22 * per_256, 10 * per_256);
        }
Example #22
0
 public Score_Number(TextureManager _t)
 {
     texturemanager = _t;
     NumberDic = new Dictionary<string, Sprite>();
     Texture texture = _t.Get("fontex");
     for (int i = 0; i < 10; i++)
     {
         Sprite sp = new Sprite();
         sp.Texture = texture;
         sp.SetWidth(8);
         sp.SetHeight(8);
         sp.SetUVs(i * per_256, 0, (i + 1) * per_256, per_256);
         NumberDic.Add(i.ToString(), sp);
     }
 }
Example #23
0
 public Blue_Ray(TextureManager _t , Vector2D position , Vector2D direction = null, bool goright = true)
 {
     right = goright;
     Direction = new Vector2D(0, -1);
     speed = 100;
     Texture texture = _t.Get("Rays");
     this.Position = position;        //头坐标
     if (direction != null)
         this.Direction = direction;
      Sprite sp;
      for (int i = 0; i < dividecount; i++)
     {
         //切分为dividecount块
         positions.Add(new Vector2D(position.X, position.Y ));
         sp = new Sprite();
         sp.Texture = texture;
         sp.SetUVs(i / dividecount, per_256 *16, (i + 1) / dividecount, per_256 * 18);
         sp.SetWidth(256/dividecount*1.5f);
         sp.SetHeight(16/2);
         Rays_sprites.Add(sp);
     }
      radius = 8;
 }
Example #24
0
 public TextFont(TextureManager textureManager)
 {
     _textureManager = textureManager;
     AddCharactors();
     CreateSprites();
 }
Example #25
0
 public TextFontEx(TextureManager _t)
 {
     texturemanager = _t;
     AddCharactor();
     CreateSprites();
 }
Example #26
0
 //构造函数都需要继承基类构造函数
 public GrazePoint(TextureManager texturemanager, double X, double Y,int score)
     : base()
 {
     this.Type = Item.Blue_Point;
     //确定弹射范围
     Position.X = X; Position.Y = Y;
     OriPosition = new Vector2D(Position.X, Position.Y);
     breakPosition = new Vector2D(Direction.X * breakLength + Position.X, Direction.Y * breakLength + Position.Y);
     this.texturemanager = texturemanager;
     ItemData = new itemdata.BluePoint(score);         //携带分数信息
     initialize();
 }
Example #27
0
        float _alpha; //那段时间的透明值

        #endregion Fields

        #region Constructors

        public ReimuBullet_Dir(TextureManager texturemanager, Vector2D direction)
        {
            bulletbody = new RedCard(texturemanager);
            direction.Normalize();
            this.Direction.X = direction.X;
            this.Direction.Y = direction.Y;

            attack = 100;
            speed = 800;

            RedEsc = (new RedBox(texturemanager)).GetSprite();
        }
Example #28
0
 public ScoreItem(TextureManager textureManager)
 {
     score_number = new Score_Number(textureManager);
 }
Example #29
0
 public Direct_BlueKnife(TextureManager texturemanager , Vector2D direction)
 {
     bulletbody = new BlueKnife(texturemanager);
     direction.Normalize();
     this.Direction.X = direction.X;
     this.Direction.Y = direction.Y;
     attack = 20;
     speed = 300;
 }
Example #30
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);
        }
Example #31
0
 public RedCard(TextureManager _t)
 {
     Texture texture = _t.Get("Player2");
     name = "RedCard";
     sprite = new Sprite();
     sprite.Texture = texture;
     sprite.SetWidth(72);
     sprite.SetHeight(16);
     sprite.SetUVs(2*per_256, 18 * per_256, 11 * per_256, 20 * per_256);
     sprite.SetColorUp(new Color(1,1,1,0.5f));
     sprite.SetColorDown(new Color(1, 1, 1, 0.5f));
 }
Example #32
0
 public BlueKnife(TextureManager _t)
 {
     Texture texture = _t.Get("etama1");
     name = "blueknife";
     sprite = new Sprite();
     sprite.Texture = texture;
     sprite.SetWidth(32);
     sprite.SetHeight(32);
     sprite.SetUVs(0, 18 * per_256, 4 * per_256, 22 * per_256);
 }