add:添加中控脚本

This commit is contained in:
bzx
2026-01-14 18:00:03 +08:00
parent bd7d8e3f2e
commit 922f2dfd43
7 changed files with 395 additions and 6 deletions

View File

@@ -102,7 +102,9 @@ public class GameManager : NetworkBehaviour
[SyncVar]
public long vistEnd = 0;
// 总游玩时长
private int vistAllTime = (int)(60 * 10f);
public int vistAllTime = (int)(60 * 10f);
public float curGameTime = 0;
[SyncVar]
public string settleData = "";
@@ -728,7 +730,13 @@ public class GameManager : NetworkBehaviour
{
//服务器计算剩余时间并同步
syncRemainingTime = GetLessTimeSeconds();
curGameTime+=Time.deltaTime;
}
}
public int GetNowTime()
{
return Mathf.RoundToInt(curGameTime);
}
}