public override void Fire() { mAudioSource.Play(); mBullet = FactoryManager.BulletFactory.CreateBullet <BulletShell>(TurretType, mHoldTime); //生成子弹: 子弹类型,预制件,数值属性 FiredBullet shell = FactoryManager.FiredBulletFactory.OpenFire(TurretType, mFireSpot, mBullet); //给发射点和子弹类,子弹发射动作 shell.Fire(); }
/// <summary> /// 发射卡农炮? /// </summary> private void FireBall() { mBullet = FactoryManager.BulletFactory.CreateBullet <BulletShell>(TurretType, mCanonTime); //生成子弹: 子弹类型,预制件,数值属性 FiredBullet canonball = FactoryManager.FiredBulletFactory.OpenFire(TurretType, mFireSpot, mBullet); canonball.Fire(); mNowBall++; mIsCanFire = false; }