Compare commits

..

No commits in common. "8e893f1e42b7deb5c30bcf1840856ea1a9f9ec95" and "3aae7026ec5cfcddf8b4b706f87c4c9c9f5dbd75" have entirely different histories.

2 changed files with 4 additions and 21 deletions

View File

@ -49,27 +49,15 @@ public class DeviceManager : MonoSingleton<DeviceManager>
{
devices.ForEach(x => x.isStartRehearsing = newValue);
}
public bool isOnlyOne = true;
private void Update()
{
if (send2roomStr.Count > 0&&isOnlyOne)
{
isOnlyOne = false;
StartCoroutine(DequeueSend2roomStr());
}
}
IEnumerator DequeueSend2roomStr()
{
while (send2roomStr.Count > 0)
if (send2roomStr.Count > 0)
{
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", send2roomStr.Dequeue()));
yield return new WaitForSeconds(0.035f);
if(send2roomStr.Count==0)
isOnlyOne = true;
}
}

View File

@ -198,12 +198,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{
if (isEngagedTarget) return;
List<Collider> colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
List<Collider> colliders1 = new List<Collider>();
for (int i=0;i< colliders.Count; i++)
{
if (colliders[i].transform.tag == "AttackTarget")
colliders1.Add(colliders[i]);
}
List<Collider> colliders1 = colliders.FindAll(x => x.transform.tag == "AttackTarget");
if (colliders1.Count > 0)
{
isEngagedTarget = true;