示例#1
0
        public override void Fire()
        {
            if (!living)
            {
                return;
            }
            //Bullet b = new Blue_Ray(texturemanager,
            //    new Vector2D(Position.X, Position.Y - 10), new Vector2D(Direction.X, Direction.Y), isleft);
            Vector2D vct = new Vector2D(Datas.CurrentPlayer.Position.X - Position.X,
                                        Datas.CurrentPlayer.Position.Y - Position.Y);

            Bullet b = new Direct_BlueKnife(texturemanager, vct);// new Vector2D(Direction.X, Direction.Y));

            b.Position.X = Position.X; b.Position.Y = Position.Y;
            bullet_toAdd.Add(b);

            if (needReupdate)
            {
                b.Update(ReupdateTime);           //有再更新的话需要单独对子弹也进行更新
            }
        }
示例#2
0
        public override void Fire()
        {
            if (!living)
                return;
            //Bullet b = new Blue_Ray(texturemanager,
            //    new Vector2D(Position.X, Position.Y - 10), new Vector2D(Direction.X, Direction.Y), isleft);
            Vector2D vct = new Vector2D(Datas.CurrentPlayer.Position.X - Position.X,
                       Datas.CurrentPlayer.Position.Y - Position.Y);

            Bullet b = new Direct_BlueKnife(texturemanager, vct);// new Vector2D(Direction.X, Direction.Y));
            b.Position.X = Position.X; b.Position.Y = Position.Y;
            bullet_toAdd.Add(b);

            if (needReupdate)
            {
                b.Update(ReupdateTime);           //有再更新的话需要单独对子弹也进行更新
            }
        }