public void FireByPort(int portIdx) { if (_firePorts != null && _firePorts.Length != 0 && portIdx >= 0) { RangerAgent.FireBullet(_firePorts, portIdx, -1, _owner); } }
public void StopFireByPort(int portIdx) { if (_firePorts != null && _firePorts.Length != 0 && portIdx >= 0) { RangerAgent.StopFire(_firePorts[portIdx]); } }
public static void KillBulletWithFirePort(int portIdx, RangerAgent ra) { BulletList bulletListSource = ra._bulletListSource; FirePort[] firePorts = ra._firePorts; if (firePorts != null && portIdx < firePorts.Length) { if (firePorts[portIdx]._fireCount != 0) { for (int i = 0; i < firePorts[portIdx]._bulletNames.Length; i++) { bulletListSource.KillABulletByNameAndFireport(firePorts[portIdx]._bulletNames[i], firePorts[portIdx]._portName); } } } }