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
    public void DoLogin(string eMail, string pwd)
    {
        mLoginInfo             = new LoginInfo();
        mLoginInfo.memberEmail = eMail;
        mLoginInfo.memberName  = "";
        mLoginInfo.memberPwd   = pwd;
        mLoginEvent            = new LoginEvent(new EventDelegate(this, "LoginComplete"));
//		UtilMgr.ShowLoading (true);

        PlayerPrefs.SetString(Constants.PrefEmail, eMail);
        PlayerPrefs.SetString(Constants.PrefPwd, pwd);

        if (Application.platform == RuntimePlatform.Android)
        {
            AndroidMgr.RegistGCM(new EventDelegate(this, "SetGCMId"));
        }
        else if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
        }
        else if (Application.platform == RuntimePlatform.OSXEditor)
        {
            mLoginInfo.memUID = "";
            NetMgr.DoLogin(mLoginInfo, mLoginEvent);
        }
    }
Beispiel #3
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();
        }
    }
Beispiel #4
0
 public void GoNext()
 {
     if (mSelected)
     {
         mMemInfo.FavoBB = mTeamCode;
                     #if (UNITY_EDITOR)
         mMemInfo.OsType = 0;
         CompleteGCM();
                     #elif (UNITY_ANDROID)
         mMemInfo.OsType = 1;
         AndroidMgr.RegistGCM(new EventDelegate(this, "CompleteGCM"));
                     #else
         memInfo.OsType = 2;
                     #endif
     }
     else if (!mSelected)
     {
         DialogueMgr.ShowDialogue(
             "Select Team", "You must choose a team!", DialogueMgr.DIALOGUE_TYPE.Alert,
             null, null, null);
     }
 }
    //    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();
        }
    }