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; }
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); }