private async void Sync() { FtRequestData response = await Game.Service.Sync(GetAllUnitActions()); Global.Log(response.ToJson()); // transform unit actions List <JsonElement> elems = response.UnitActions.Cast <JsonElement>().ToList(); // transform and replay the unit actions foreach (JsonElement elem in elems) { UnitAction action = UnitAction.ActionFromJson(elem); await action.Replay(); await Global.WaitFor(1); } }
public SignalAwaiter ReplayAction(UnitAction action) { return(action.Replay()); }