public void GoNext()
    {
        if (mSelected && IsGuest)
        {
            GetUID();
        }
        else if (mSelected)
        {
            mMemInfo.FavoBB = mTeamCode;
                        #if (UNITY_EDITOR)
            mMemInfo.OsType = 1;
            CompleteGCM();
                        #elif (UNITY_ANDROID)
            mMemInfo.OsType = 1;
            AndroidMgr.RegistGCM(new EventDelegate(this, "CompleteGCM"));
                        #else
            mMemInfo.OsType = 2;
            if (GetComponentInParent <ScriptTitle>().CheckPushAgree())
            {
                CompleteGCM();
            }
            else
            {
                IOSMgr.RegistAPNS(new EventDelegate(this, "SetGCMId"));
            }
//			IOSMgr.RegistAPNS(new EventDelegate(this, "CompleteGCM"));
                        #endif
        }
        else if (!mSelected)
        {
            DialogueMgr.ShowDialogue(
                mErrorTitle, mErrorBody, DialogueMgr.DIALOGUE_TYPE.Alert,
                null, null, null, null);
        }
    }
Beispiel #2
0
    void Login()
    {
        mLoginInfo = new LoginInfo();

        if (mNick == null)
        {
            mLoginInfo.nick = mCheckEvent.Response.data.nick;
        }
        else
        {
            mLoginInfo.nick = mNick;
        }

        if (Application.platform == RuntimePlatform.Android)
        {
            mLoginInfo.osType = 1;
            AndroidMgr.RegistGCM(new EventDelegate(this, "SetGCMId"));
            StartCoroutine(WaitingToken());
        }
        else if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            mLoginInfo.osType = 2;
            //			if(CheckPushAgree()){
            //				mLoginInfo.memUID = "";
            //				//                NetMgr.DoLogin (mLoginInfo, mLoginEvent);
            //				SetGCMId();
            //			} else{
            IOSMgr.RegistAPNS(new EventDelegate(this, "SetGCMId"));
            //waiting 3 secs
            StartCoroutine(WaitingToken());
            //			}
        }
        else if (Application.platform == RuntimePlatform.OSXEditor)
        {
            mLoginInfo.osType = 1;
            mLoginInfo.memUID = "";
            //            NetMgr.DoLogin (mLoginInfo, mLoginEvent);
            SetGCMId();
        }
    }
    //    public void Login(string eMail, string pwd)
    public void Login(LoginInfo loginInfo)
    {
        //        mLoginInfo = new LoginInfo ();
        mLoginInfo             = loginInfo;
        mLoginInfo.memberEmail = "";
        //        mLoginInfo.memberName = nick;
        mLoginInfo.memberPwd = "";
        mLoginEvent          = new LoginEvent(new EventDelegate(this, "LoginComplete"));
        //        UtilMgr.ShowLoading (true);

        PlayerPrefs.SetString(Constants.PrefNick, loginInfo.memberName);
        //        PlayerPrefs.SetString (Constants.PrefPwd, pwd);

        if (Application.platform == RuntimePlatform.Android)
        {
            mLoginInfo.osType = 1;
            AndroidMgr.RegistGCM(new EventDelegate(this, "SetGCMId"));
        }
        else if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            mLoginInfo.osType = 2;
//			if(CheckPushAgree()){
//				mLoginInfo.memUID = "";
//				//                NetMgr.DoLogin (mLoginInfo, mLoginEvent);
//				SetGCMId();
//			} else{
            IOSMgr.RegistAPNS(new EventDelegate(this, "SetGCMId"));
            //waiting 4 secs
            StartCoroutine(WaitingToken());
//			}
        }
        else if (Application.platform == RuntimePlatform.OSXEditor)
        {
            mLoginInfo.osType = 1;
            mLoginInfo.memUID = "";
            //            NetMgr.DoLogin (mLoginInfo, mLoginEvent);
            SetGCMId();
        }
    }