This commit is contained in:
XgC2961 2025-08-29 09:31:59 +08:00
parent da92e25830
commit 70343caa0f
1 changed files with 10 additions and 7 deletions

View File

@ -3,7 +3,6 @@ using System.Net.Sockets;
using System.Net;
using System.Text;
using System.Threading;
using System.Collections.Generic;
public class DisplayServer : MonoBehaviour
{
@ -11,14 +10,16 @@ public class DisplayServer : MonoBehaviour
private Thread listenThread;
private bool isRunning = true;
<<<<<<< HEAD
public Transform background;
private string latestMsg = "";//最新信息
public Animator modelAnimator;//模型动画
=======
>>>>>>> 6d1a14ffd35fa4fa432a593073532c7106ac1d6d
void Start()
{
Screen.SetResolution(3328, 1352, false);
listener = new TcpListener(IPAddress.Any, 8888);
listener.Start();
@ -27,8 +28,6 @@ public class DisplayServer : MonoBehaviour
listenThread.Start();
Debug.Log("显示端服务器已启动,等待触摸端连接...");
ShowPage("Ê×Ò³");
}
private void ListenForClients()//连接触摸控制端
@ -67,10 +66,8 @@ public class DisplayServer : MonoBehaviour
string data = Encoding.UTF8.GetString(message, 0, bytesRead);
Debug.Log("收到指令: " + data);
latestMsg = data;
}
}
<<<<<<< HEAD
private void Update()
{
if (!string.IsNullOrEmpty(latestMsg))
@ -117,6 +114,12 @@ public class DisplayServer : MonoBehaviour
Debug.Log($"显示端播放动画:{animName}");
}
=======
}
}
>>>>>>> 6d1a14ffd35fa4fa432a593073532c7106ac1d6d
private void OnApplicationQuit()
{
isRunning = false;