This commit is contained in:
账号名 2023-11-23 14:57:51 +08:00
parent 28e5546467
commit 21b1bd9b66
1 changed files with 4 additions and 10 deletions

View File

@ -260,19 +260,13 @@ public class UnmannedAerialVehicle : MonoBehaviour
transform.DOKill();
}
//位置实时传送
private string latestData = "";
public void SendMsg(Transform attackTarget)
{
var nowData = GetSyncData(attackTarget);
if (!nowData.Equals(latestData))
{
latestData = nowData;
Debug.Log(latestData);
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
}
var nowData = GetSyncData(attackTarget);
Debug.Log(nowData);
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
}