public void SendUserAction(Network.UserActionData userActionData) { if (client?.Connected == true) { client.SendUserAction(userActionData, response => { if (response != Network.ResponseType.Ok) { client.RequestGameStateUpdate(); } }); } }
public void SendUserAction(UserActionData userAction, Action <ResponseType> responseAction) { RegisterResponse(userAction.MessageIndex, responseAction); SendUserAction(userAction); }
public void SendUserAction(UserActionData userAction) { Log.Verbose.Write(ErrorSystemType.Network, $"Send user action {userAction.UserAction} to server."); lastOwnHearbeat = DateTime.UtcNow; userAction.Send(server); }