Пример #1
0
    public void OnCancel()
    {
        KDTLWebView.removeWebView();
#if  UNITY_ANDROID
        WebMediator.HideWebView();
#endif
    }
Пример #2
0
    public void PurchaseOther()
    {
        //TODO: invoke gash webviwe
        Debug.Log("PurchaseController PurchaseOther");

        appId     = _appId;
        appkey    = _appKey;
        appsecret = _appsecret;

        userId  = Obj_MyselfPlayer.GetMe().uid;
        groupId = Obj_MyselfPlayer.GetMe().areaId.ToString();
        version = ClientConfigure.VersionNumber.ToString();
        Debug.Log("APPID:" + appId);
        Debug.Log("appkey:" + appkey);
        Debug.Log("appsecret:" + appsecret);
        Debug.Log("userId:" + userId);
        Debug.Log("groupId:" + groupId);
        Debug.Log("version:" + version);

        KDTLWebView.ShowWebView(ClientConfigure.getOtherPurchaseUrl() + "?userId=" + userId
                                + "&groupId=" + groupId
                                + "&appId=" + appId
                                + "&appkey=" + appkey
                                + "&appsecret=" + appsecret
                                + "&version=" + version
                                , PurchaseOver);
    }
 public void OnCard()
 {
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn56).ToString());
     KDTLWebView.ShowWebView(DeviceHelper.GetNoticeUrl(), KDTLWebView.webViewMode.NOTICE);
     //王明磊 : 统计模块代码 -> Statistics
     //BoxManager.showMessage("功能暂未开放");
     //BoxManager.showMessageByID((int)MessageIdEnum.Msg18);
 }
 public void otherRegFinish(string username)
 {
     Debug.Log("otherRegFinish:" + username);
     KDTLWebView.removeWebView();
     //registerUI.GetComponent<CyouRegister>().setUserName(username);
     registerUI.SetActive(false);
     ShowLoginUI();
     loginUI.GetComponent <CyouLogin>().setUserName(username);
 }
    void OnEnable()
    {
        //KDTLWebView.Instance.SetWebView();
#if UNITY_IPHONE
        KDTLWebView.ShowWebView(raiderurl, KDTLWebView.webViewMode.RAIDER);
        gameObject.SetActive(false);
#elif UNITY_ANDROID
        KDTLWebView.ShowWebView(raiderurl, KDTLWebView.webViewMode.RAIDER);
        gameObject.SetActive(false);
#endif
    }
 public void GotoFacebookUrl(bool success)
 {
     if (success)
     {
         Debug.Log("GotoFacebookUrl Net success");
     }
     else
     {
         Debug.Log("GotoFacebookUrl Net error");
     }
     KDTLWebView.ShowWebView(ClientConfigure.getFacebookUrl());
 }
    public void OnRaider()
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn55).ToString());

#if UNITY_IPHONE
        KDTLWebView.ShowWebView(raidrul, KDTLWebView.webViewMode.RAIDER);
#elif UNITY_ANDROID
        KDTLWebView.ShowWebView(raidrul, KDTLWebView.webViewMode.RAIDER);
#else
        mainUILogic.SendMessage("OnRaider");
#endif
    }
 public void RequestFacebookUrl(GameObject obj)
 {
     //test
     //GotoFacebookUrl(true);
     if (!PlayerPrefs.HasKey(Obj_MyselfPlayer.GetMe().accountID.ToString() + "_huodong_facebookLove"))
     {
         PlayerPrefs.SetInt(Obj_MyselfPlayer.GetMe().accountID.ToString() + "_huodong_facebookLove", 1);
         PlayerPrefs.Save();
         NetworkSender.Instance().RequestTaskOver(GotoFacebookUrl, 1);
     }
     else
     {
         KDTLWebView.ShowWebView(ClientConfigure.getFacebookUrl());
     }
 }
    public void CheckPublicNoticeShow()
    {
        if (!Obj_MyselfPlayer.ShowedPublicNotice && !GameManager.Instance.isGuideMode())
        {
            Obj_MyselfPlayer.ShowedPublicNotice = true;
            Debug.Log("Enter define of unity_iphone");
#if UNITY_ANDROID
            StartCoroutine("showNotice");
#else
            KDTLWebView.ShowPreWebView();
//			WebMediator.Show();
//            KDTLWebView.ShowWebView(DeviceHelper.GetNoticeUrl(), KDTLWebView.webViewMode.NOTICE);
#endif
        }
    }
//--------------------------------登陆函数模块--------------------------------
    public void OnGameLogin()
    {
        //初始化userType
        if (!Obj_MyselfPlayer.ShowedPublicNotice)
        {
            KDTLWebView.PreWebView(DeviceHelper.GetNoticeUrl());
        }
        switch (serverType)
        {
        case 0:        //default
            OnChangeServer(_defaultServerName);
            break;

        case 1:        //last
            OnChangeServer(_lastServerName);
            break;

        default:
            //不进行操作
            break;
        }
        AccountManager.Instance.initGuestAccount();
        switch (AccountManager.userType)
        {
        case AccountManager.UserType.NewUser:
            Debug.Log("Is New User");
            break;

        case AccountManager.UserType.NotBinding:
            Debug.Log("Not Binding User");
            break;

        case AccountManager.UserType.OldUser:
            Debug.Log("Old User");
            break;

        default:
            Debug.Log("Unknown User Type");
            break;
        }

        if (FbHelper.UseFbLogin)
        {
            if (FB.IsLoggedIn && !string.IsNullOrEmpty(FB.UserId) && !string.IsNullOrEmpty(FB.AccessToken))
            {
                FacebookLoginCallBack();
                return;
            }
            else
            {
                FbHelper.CallFBLogin(FacebookLoginCallBack);
                return;
            }
        }
        Debug.Log("normal login");

#if UNITY_ANDROID
        if (AndroidConfig.isUCChannel() || AndroidConfig.isThirdSDKPlatform())
        {
            //安卓非畅游官网渠道
            CYouLogin();
        }
        else
        {
            //安卓官网渠道
            if (AccountManager.userType != AccountManager.UserType.OldUser)
            {
                QuickLogin();
            }
            else
            {
                CYouLogin();
            }
        }
#else
        if (DeviceHelper.GetChannelID() == DeviceHelper.CHANNEL_PP)
        {
            PPLogin();
        }
        else
        {
            if (AccountManager.userType != AccountManager.UserType.OldUser)
            {
                QuickLogin();
            }
            else
            {
                CYouLogin();
            }
        }
#endif
    }
Пример #11
0
    IEnumerator showNotice()
    {
        yield return(new WaitForSeconds(1f));

        KDTLWebView.ShowWebView(DeviceHelper.GetNoticeUrl(), KDTLWebView.webViewMode.NOTICE);
    }
Пример #12
0
 public void OnForgetPassowrdBtn()
 {
     Debug.Log("OnForgetPassowrdBtn(), " + AccountManager.forgetPasswordURL);
     KDTLWebView.ShowWebView(AccountManager.forgetPasswordURL);
 }
Пример #13
0
 public void OnFeedBackClick()
 {
     KDTLWebView.ShowWebView(ClientConfigure.getFacebookUrl());
 }
//	public void setUserName(string name)
//	{
//		Debug.Log("setUserName:"+name);
//		userNameInput.text = name;
//	}
#if UNITY_ANDROID
    void OnRegisterOther()
    {
        KDTLWebView.ShowWebView(AccountManager.registerOther);
    }
 public void OnRegisterOtherBtn()
 {
     KDTLWebView.ShowWebView("http://member.changyou.com/webphoregist/phone_regist.html?gametype=undefined&order=spe");
 }
 public void OnAgreementBtn()
 {
     Debug.Log("OnAgreementBtn(), " + AccountManager.userAgreementURL);
     KDTLWebView.ShowWebView(AccountManager.userAgreementURL);
 }