@@ -34,6 +34,7 @@ public class Bullet : MonoBehaviour
private bool hasBack = false; //已经回来了
[Header("传送门")]
+ public bool canTransmit; //子弹是否能被传送门传送
public bool haveTransmit; //刚传送过
[HideInInspector]
public float transmitTime; //传送CD
@@ -30,7 +30,7 @@ public class PortalsController : MonoBehaviour
}
//´«ËÍ×Óµ¯
Bullet bullet = other.GetComponent<Bullet>();
- if(bullet != null)
+ if(bullet != null && bullet.canTransmit)
{
Rigidbody rb = bullet.GetComponentInParent<Rigidbody>();
if (Transmit(rb))