add:添加中控控制脚本

This commit is contained in:
bzx
2026-01-14 19:13:11 +08:00
parent eb206db3c1
commit accdca2ff4
7 changed files with 386 additions and 9 deletions

View File

@@ -117,7 +117,9 @@ public class GameManager : NetworkBehaviour
[SyncVar]
public long vistEnd = 0;
// 总游玩时长
private int vistAllTime = (int)(60 * 15);
public int vistAllTime = (int)(60 * 15);
public float curGameTime = 0;
[SyncVar]
public string settleData = "";
@@ -162,6 +164,15 @@ public class GameManager : NetworkBehaviour
{
// 更新指引箭头位置
UpdateGuideArrowPosition();
if (gameState == GameState.Playing)
{
curGameTime+=Time.deltaTime;
}
}
public int GetNowTime()
{
return Mathf.RoundToInt(curGameTime);
}
/// <summary>