Commit 724122e7 authored by Maxime's avatar Maxime
Browse files

fix android task from other task

parent cf6f0916
......@@ -80,23 +80,25 @@ namespace ZZZZZZ
RemotePlayerManager = new RemotePlayerManager(new RemoteCharacter((joinedID + 1) % 2), LevelManager);
});
Task.Delay(50).Wait();
Task.Run(() =>
InvokeOnMain(() =>
{
while (true)
Task.Run(() =>
{
API.UpdateLocal(LocalPlayerManager.Character as LocalCharacter);
Task.Delay(16).Wait();
}
});
while (true)
{
API.UpdateLocal(LocalPlayerManager.Character as LocalCharacter);
Task.Delay(16).Wait();
}
});
Task.Run(() =>
{
while (true)
Task.Run(() =>
{
API.UpdateRemote(RemotePlayerManager.Character as RemoteCharacter);
Task.Delay(16).Wait();
}
while (true)
{
API.UpdateRemote(RemotePlayerManager.Character as RemoteCharacter);
Task.Delay(16).Wait();
}
});
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment