コード例 #1
0
 public void setMethod(XsollaPaymentMethod pMethod)
 {
     _method = pMethod;
 }
コード例 #2
0
 private void CreatePaymentBtn(XsollaPaymentMethod pMethod)
 {
     GameObject popularBtn = Instantiate(Resources.Load("Prefabs/SimpleView/_PaymentFormElements/ShopPaymentBtn")) as GameObject;
     popularBtn.transform.SetParent(containerBtns.transform);
     ShopPaymentBtnController controller = popularBtn.GetComponent<ShopPaymentBtnController>();
     listBtns.Add(controller);
     // Set method
     controller.setMethod(pMethod);
     // Set icon
     controller.setIcon(imageLoader);
     //			if (pMethod.GetImageUrl() != "")
     //				imageLoader.LoadImage(controller._icon, pMethod.GetImageUrl());
     controller._btn.onClick.AddListener(() => OnChoosePaymentMethod(controller.getMethod().id));
 }
コード例 #3
0
        private void CreateQuickBtn(XsollaPaymentMethod pMethod)
        {
            GameObject quickBtn = Instantiate(Resources.Load("Prefabs/SimpleView/_PaymentFormElements/QuickPaymentBtn")) as GameObject;
            quickBtn.transform.SetParent(quickPanel.transform);
            QuickPaymentBtnController controller = quickBtn.GetComponent<QuickPaymentBtnController>();
            listQuickBtns.Add(controller);
            if (pMethod == null)
            {
                controller.Hide();
                return;
            }

            // Set method
            controller.setMethod(pMethod);
            // Set name
            controller.setLable(pMethod.GetName());
            // Set icon
            controller.setIcon(pMethod.id, imageLoader);
            controller._btnMethod.onClick.AddListener(() => OnChoosePaymentMethod(controller.getMethod().id));
        }