예제 #1
0
    //    public void GuestCompelte(){
    //        Login (mLoginEvent.Response.data.memberEmail, mLoginEvent.Response.data.memberPwd);
    //    }

    public void SetGCMId()
    {
        UtilMgr.DismissLoading();
                #if (UNITY_EDITOR)
        mLoginInfo.memUID   = AndroidMgr.GetMsg();
        mLoginInfo.DeviceID = SystemInfo.deviceUniqueIdentifier;
        DoLogin();
                #elif (UNITY_ANDROID)
        mLoginInfo.memUID   = AndroidMgr.GetMsg();
        mLoginInfo.DeviceID = SystemInfo.deviceUniqueIdentifier;
        DoLogin();
                #else
        StopCoroutine(WaitingToken());
        mLoginInfo.memUID = IOSMgr.GetMsg();
        EventDelegate eventd = new EventDelegate(this, "DoLogin");
        IOSMgr.GetUID("", eventd);
                #endif
    }
예제 #2
0
    public void DoJoin()
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            mMemInfo.DeviceID = IOSMgr.GetMsg();
        }
//		GetComponentInParent<ScriptTitle>().mProfileEvent =
//			new GetProfileEvent(new EventDelegate(this, "CompletedJoin"));
//		NetMgr.JoinMember(mMemInfo, GetComponentInParent<ScriptTitle>().mProfileEvent, UtilMgr.IsTestServer(), true);
        Debug.Log("memName is " + mMemInfo.MemberName);
        LoginInfo loginInfo = new LoginInfo();

        loginInfo.memberName = mMemInfo.MemberName;
        loginInfo.Photo      = mMemInfo.Photo;
        loginInfo.PhotoBytes = mMemInfo.PhotoBytes;
        loginInfo.DeviceID   = mMemInfo.DeviceID;
        GetComponentInParent <ScriptTitle>().Login(loginInfo);
//		GetComponentInParent<ScriptTitle>().Login(mMemInfo.MemberEmail, mMemInfo.MemberPwd);
    }
예제 #3
0
    public void GotImage()
    {
                #if (UNITY_EDITOR)
                #elif (UNITY_ANDROID)
        mImgPath = AndroidMgr.GetMsg();
                #else
        mImgPath = IOSMgr.GetMsg();
                #endif

//		string filePath = mImgPath;
        if (System.IO.File.Exists(mImgPath))
        {
            WWW www = new WWW("file://" + mImgPath);
            StartCoroutine(LoadImage(www));
        }
        else
        {
            DialogueMgr.ShowDialogue("Error", "파일을 찾을 수 없습니다.", DialogueMgr.DIALOGUE_TYPE.Alert, null);
        }
    }
예제 #4
0
    public void SetMemberPhoto(Texture2D texture)
    {
        Sett = true;
        bool B = SettingPage.activeSelf;

        if (!SettingPage.activeSelf)
        {
            SettingPage.SetActive(true);
        }
//		Setimagebyte = Photo;
        Setimagebyte = File.ReadAllBytes(IOSMgr.GetMsg());
        //		Setimage.LoadImage (Setimagebyte);
        //	if (Setimage != null) {
        SettingPage.transform.FindChild("Panel").FindChild("Photo").GetComponent <UITexture> ().mainTexture = texture;


        //}
        SettingPage.SetActive(false);
        SettingPage.SetActive(true);
        SettingPage.SetActive(B);
    }
예제 #5
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();
        }
    }
예제 #6
0
    //    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();
        }
    }
예제 #7
0
    void ruby()
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
//			EventDelegate eventd = new EventDelegate(this, "purchaseInit");
//			string prodList = "";
//			foreach(ItemShopRubyInfo rubyInfo in getruby.Response.data){
//				prodList += rubyInfo.productCode + ";";
//			}
            IOSMgr.InAppInit();
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
                        #if (UNITY_ANDROID)
            GoogleIAB.init(Constants.GOOGLE_PUBLIC_KEY);
                        #endif
        }

//		} else{
        GetAblePP();
//		}
    }
예제 #8
0
    public void DoLogin()
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            mLoginInfo.DeviceID = IOSMgr.GetMsg();
        }
        Debug.Log("ID is " + mLoginInfo.DeviceID);
        //        NetMgr.DoLogin (mLoginInfo, mLoginEvent, UtilMgr.IsTestServer(), true);

        if (Application.platform == RuntimePlatform.Android)
        {
            mLoginInfo.osType = 1;
        }
        else if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            mLoginInfo.osType = 2;
        }
        else if (Application.platform == RuntimePlatform.OSXEditor)
        {
            mLoginInfo.osType = 1;
        }
        NetMgr.LoginGuest(mLoginInfo, mLoginEvent, UtilMgr.IsTestServer(), true);
    }
예제 #9
0
 public static void GetHeightStatusBar()
 {
     IOSMgr.CallIOSFunc("GetHeightStatusBar", "");
 }
예제 #10
0
 public static void OpenFB(EventDelegate eventDelegate)
 {
     Instance.mEventDelegate = eventDelegate;
     IOSMgr.CallIOSFunc("OpenFB", "");
 }
예제 #11
0
 public static void ViberateDevice(long millSec)
 {
     IOSMgr.CallIOSFunc("ViberateDevice", string.Format("{0}", millSec));
 }
예제 #12
0
 public static void RegistGCM(EventDelegate eventDelegate)
 {
     Instance.mEventDelegate = eventDelegate;
     IOSMgr.CallIOSFunc("RegisterGCM", "");
 }
예제 #13
0
 public static void GetGalleryImages(EventDelegate eventDelegate)
 {
     Instance.mEventDelegate = eventDelegate;
     IOSMgr.CallIOSFunc("GetGalleryImages", "");
 }