예제 #1
0
        private IEnumerator checkout(Action<CheckoutResponse> callback)
        {
            Request r = new Request("game/checkout");

            WWW w = runRequest(r);
            yield return w; // wait for response

            CheckoutResponse res = new CheckoutResponse(processWWWResult(w));
            if (!res.Ready)
            {
                res.ErrorId = ErrorId;
                res.ErrorText = ErrorText;
            }
            else CurrentCheckin = null;

            callback(res);
        }
예제 #2
0
 private void checkoutResponse(CheckoutResponse res)
 {
     if (res.Ready)
     {
         Debug.Log("CHECKOUT: ok");
         note = "";
     }
     else
     {
         Debug.Log("CHECKOUT: " + res.ErrorText + "(" + res.ErrorId + ")");
     }
 }