/// <summary> /// 构造函数初始化 /// </summary> /// <param name="pf"></param> /// <param name="speed"></param> /// <param name="power"></param> public ZiDanHero(PlaneFather pf, int speed, int power) : base(pf, ZDhero, speed, power) { }
/// <summary> /// 构造函数需要传递是谁发射的这个子弹,子弹是什么图片,速度是多少,威力是多大 /// </summary> /// <param name="pf"></param> /// <param name="img"></param> /// <param name="speed"></param> /// <param name="power"></param> public ZiDanFather(PlaneFather pf, Image img, int speed, int power) : base(pf.X + pf.Width / 4 - 3, pf.Y, img.Width, img.Height, speed, 0, pf.Dir)//飞机朝上,子弹朝上,飞机朝下,子弹朝下 { this.imgZidan = img; this.Power = power; }