// Felix-Bang:FBFan //   へ     /| //  /\7    ∠_/ //  / │   / / // │ Z _,< /   /`ヽ // │     ヽ   /  〉 //  Y     `  /  / // イ● 、 ●  ⊂⊃〈  / // ()  へ    | \〈 //  >ー 、_  ィ  │ // //  / へ   / ノ<| \\ //  ヽ_ノ  (_/  │// //  7       |/ //  >―r ̄ ̄`ー―_ // Describe:风扇炮塔 // Createtime:2018/10/18 using System.Collections; using System.Collections.Generic; using UnityEngine; namespace FBApplication { public class FBFan : FBTower { private int f_bulletCount = 6; protected override void Shot(FBMonster monster) { base.Shot(monster); for (int i = 0; i < f_bulletCount; i++) { float radians = (Mathf.PI * 2f / f_bulletCount) * i; Vector3 dir = new Vector3(Mathf.Cos(radians), Mathf.Sin(radians), 0f); //产生子弹 GameObject go = FBGame.Instance.ObjectPool.Spawn("FanBullet"); FBFanBullet bullet = go.GetComponent(); bullet.transform.position = transform.position;//中心点 bullet.Load(this.UseBulletID, this.Level, this.MapRect, dir); } } } }