Exemplo n.º 1
0
        public Stage01_E01c(EnemyData edt,bool _turnleft = false)
        {
            turnleft = _turnleft;
            enemydata = edt;
            enemydata.Speed = 150;
            direction = enemydata.Direction;
            position = enemydata.Position;
            direction.X = 0;
            direction.Y = -1;

            TCset godir = new TCset(0,200);                  //0-200帧行走直线并且进行减速
            godir.Name = "godir";
            commands.Add(godir);

            TCset rotate = new TCset(500, 580);              //500-580帧时进行旋转,并且进行加速
            rotate .Name =  "rotate";
            commands .Add(rotate);
        }
Exemplo n.º 2
0
        public Stage01_E01c(EnemyData edt, bool _turnleft = false)
        {
            turnleft        = _turnleft;
            enemydata       = edt;
            enemydata.Speed = 150;
            direction       = enemydata.Direction;
            position        = enemydata.Position;
            direction.X     = 0;
            direction.Y     = -1;

            TCset godir = new TCset(0, 200);                  //0-200帧行走直线并且进行减速

            godir.Name = "godir";
            commands.Add(godir);

            TCset rotate = new TCset(500, 580);              //500-580帧时进行旋转,并且进行加速

            rotate.Name = "rotate";
            commands.Add(rotate);
        }
Exemplo n.º 3
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);
        }