Compare commits
No commits in common. "8e893f1e42b7deb5c30bcf1840856ea1a9f9ec95" and "3aae7026ec5cfcddf8b4b706f87c4c9c9f5dbd75" have entirely different histories.
8e893f1e42
...
3aae7026ec
|
|
@ -49,27 +49,15 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
{
|
{
|
||||||
devices.ForEach(x => x.isStartRehearsing = newValue);
|
devices.ForEach(x => x.isStartRehearsing = newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool isOnlyOne = true;
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (send2roomStr.Count > 0&&isOnlyOne)
|
if (send2roomStr.Count > 0)
|
||||||
{
|
|
||||||
isOnlyOne = false;
|
|
||||||
StartCoroutine(DequeueSend2roomStr());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator DequeueSend2roomStr()
|
|
||||||
{
|
|
||||||
while (send2roomStr.Count > 0)
|
|
||||||
{
|
{
|
||||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", send2roomStr.Dequeue()));
|
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", send2roomStr.Dequeue()));
|
||||||
yield return new WaitForSeconds(0.035f);
|
|
||||||
if(send2roomStr.Count==0)
|
|
||||||
isOnlyOne = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -198,12 +198,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (isEngagedTarget) return;
|
if (isEngagedTarget) return;
|
||||||
List<Collider> colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
List<Collider> colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||||
List<Collider> colliders1 = new List<Collider>();
|
List<Collider> colliders1 = colliders.FindAll(x => x.transform.tag == "AttackTarget");
|
||||||
for (int i=0;i< colliders.Count; i++)
|
|
||||||
{
|
|
||||||
if (colliders[i].transform.tag == "AttackTarget")
|
|
||||||
colliders1.Add(colliders[i]);
|
|
||||||
}
|
|
||||||
if (colliders1.Count > 0)
|
if (colliders1.Count > 0)
|
||||||
{
|
{
|
||||||
isEngagedTarget = true;
|
isEngagedTarget = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue