test
This commit is contained in:
parent
8c1ab9b12e
commit
6550f1273d
2 changed files with 3 additions and 1 deletions
|
@ -220,6 +220,7 @@ namespace DangerousD.GameCore
|
|||
|
||||
public void NetworkSync(List<NetworkTask> networkTasks)
|
||||
{
|
||||
DebugHUD.Log("networksync");
|
||||
foreach (NetworkTask networkTask in networkTasks)
|
||||
{
|
||||
switch (networkTask.operation)
|
||||
|
|
|
@ -134,8 +134,9 @@ namespace DangerousD.GameCore
|
|||
{
|
||||
if (AppManager.Instance.NetworkTasks.Count > 0)
|
||||
{
|
||||
if (gameTime.ElapsedGameTime.Milliseconds - _lastUpdate > 1000)
|
||||
if (gameTime.TotalGameTime.Milliseconds - _lastUpdate > 1000)
|
||||
{
|
||||
AppManager.Instance.DebugHUD.Log("sending");
|
||||
AppManager.Instance.NetworkManager.SendMsg(AppManager.Instance.NetworkTasks.ToList());
|
||||
AppManager.Instance.NetworkTasks.Clear();
|
||||
_lastUpdate = gameTime.ElapsedGameTime.Milliseconds;
|
||||
|
|
Loading…
Add table
Reference in a new issue