Exemplo n.º 1
0
        private void OnEnsurePayClik()
        {
            //直接登录模式直接调起
            if (PayOrderInterfaceMgr.Instance.payfor == PayFor.Login && !PlayerSave.HasKey("Login"))
            {
                NativeHandle handle = new NativeHandle();
                if (type == payType.alipay)
                {
                    object payData = PayOrderInterfaceMgr.Instance.GetDatas(LoginModel.Instance.Uid, Urltype.alipay, PayOrderInterfaceMgr.Instance.payfor, GetPayCount());
                    if (payData != null)
                    {
                        handle.Alipay(payData.ToString());

                        Debug.Log(string.Format("<color=#ffffffff><---{0}-{1}----></color>", payData.ToString(), "test1"));
                    }
                }
                else if (type == payType.wechat)
                {
                    object o = PayOrderInterfaceMgr.Instance.GetDatas(LoginModel.Instance.Uid, Urltype.wx, PayOrderInterfaceMgr.Instance.payfor, GetPayCount());
                    if (o != null)
                    {
                        PayData payData = o as PayData;
                        handle.WechatPay(payData.appid, payData.partnerid, payData.prepayid, payData.noncestr, payData.timestamp, payData.package, payData.sign);
                    }
                }
                else
                {
                    SystemMsgView.SystemFunction(Function.Tip, Info.Chooseone);
                }
            }
            else if (PayOrderInterfaceMgr.Instance.payfor == PayFor.Exchange)
            {
                CommitViewModel cvm = CommitViewModel.Instance;
                CommitController.Instance.OidExchangeReq(LoginModel.Instance.Uid, 1, cvm.Name, cvm.Phone, cvm.Province, cvm.City, cvm.Country, cvm.SelectPinpai, cvm.Address, cvm.Beaty, (int)type);
            }
            EnsurePay.onClick.RemoveListener(OnEnsurePayClik);
        }
Exemplo n.º 2
0
 //点击音效开关
 private void OnClickAudioToggle(bool isOn)
 {
     MusicManager.Instance.IsMute = !isOn;
     PlayerSave.SetInt("ismute", MusicManager.Instance.IsMute?1:0);
 }
Exemplo n.º 3
0
        public override void OnOpen()
        {
            base.OnOpen();
//            if (GameStarter.isfirstLogin)
            {
                EnterGameTweener = DotweenManager.DOLocalMoveY(TargetGo).SetAutoKill(false);
                GlobalDispatcher.Instance.AddListener(LoginEvent.OnLoginSucc, HideView);
                if (PlayerSave.HasKey("Account") || PlayerSave.HasKey("Password"))
                {
                    Debug.Log(string.Format("<color=#ffffffff><---{0}-{1}----></color>", PlayerSave.GetString("Account"), "test1"));

                    password.text     = PlayerSave.GetString("Password");
                    inputAccount.text = PlayerSave.GetString("Account");
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 隐藏面板动画
        ///
        /// </summary>
        public bool HideView(int id, object arg)
        {
            CloseViewInfo closeView = arg as CloseViewInfo;
            int           pattern   = closeView.pattern;

            //返回的时候保存密码
            if (PlayerSave.HasKey("Account") || PlayerSave.HasKey("Password"))
            {
                password.text     = PlayerSave.GetString("Password");
                inputAccount.text = PlayerSave.GetString("Account");
            }
            if (pattern == 0)
            {
                //直接登录动画
                EnterGameTweener.PlayBackwards();

                EnterGameTweener.onPause += () =>
                {
                    LoginEnterToMain();
                };
            }
            else if (pattern == 1)
            {
                //注册账号界面直接登录
                RegisterViewTweener.PlayBackwards();

                RegisterViewTweener.onPause += () =>
                {
                    LoginEnterToMain();
                };
            }
            else if (pattern == 2)
            {
                ChangePWViewTweener.PlayBackwards();

                ChangePWViewTweener.onPause += () =>
                {
                    LoginEnterToMain();
                };
            }
            else if (pattern == 3)
            {
                //注册账号界面直接登录
                RegisterViewTweener.PlayBackwards();

                RegisterViewTweener.onPause += () =>
                {
                    lv.EnterGameView.SetActive(true);
                    EnterGameTweener.PlayForward();
                    if (PlayerSave.HasKey("Account") && PlayerSave.HasKey("Password"))
                    {
                        password.text     = PlayerSave.GetString("Password");
                        inputAccount.text = PlayerSave.GetString("Account");
                    }
                };
            }
            else if (pattern == 4)
            {
                ChangePWViewTweener.PlayBackwards();

                ChangePWViewTweener.onPause += () =>
                {
                    lv.EnterGameView.SetActive(true);

                    EnterGameTweener.PlayForward();
                    if (PlayerSave.HasKey("Account") && PlayerSave.HasKey("Password"))
                    {
                        password.text     = PlayerSave.GetString("Password");
                        inputAccount.text = PlayerSave.GetString("Account");
                    }
                };
            }

            return(false);
        }