add:添加中控脚本
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user