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); } }
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); } }
public void OpenCamera() { #if (UNITY_EDITOR) #elif (UNITY_ANDROID) AndroidMgr.OpenGallery(new EventDelegate(this, "GotImage")); #else #endif }
public static void OpenCamera(EventDelegate eventDelegate) { Instance.mEventDelegate = eventDelegate; string timeStr = UtilMgr.GetDateTime("yyyy-MM-dd HH:mm:ss"); timeStr += " by lb.jpg"; AndroidMgr.CallJavaFunc("OpenCamera", timeStr); }
public void SetPhoto() { Debug.Log("OpenGallery!!!"); #if (UNITY_ANDROID) AndroidMgr.OpenGallery(new EventDelegate(this, "OpenGallery")); #else IOSMgr.OpenGallery(new EventDelegate(this, "OpenGallery")); #endif }
public void CameraClicked() { if (Application.platform == RuntimePlatform.Android) { //need selection window AndroidMgr.OpenGallery(new EventDelegate(this, "GotUserImg")); } else { } }
public void OnClick() { if (Application.platform == RuntimePlatform.Android) { AndroidMgr.OpenGallery(new EventDelegate(ReceivedGallery)); } else if (Application.platform == RuntimePlatform.IPhonePlayer) { IOSMgr.OpenGallery(new EventDelegate(ReceivedGallery)); } }
public void GotImage() { #if (UNITY_EDITOR) #elif (UNITY_ANDROID) mImgPath = AndroidMgr.GetMsg(); #else #endif WWW www = new WWW("file://" + mImgPath); StartCoroutine(LoadImage(www)); }
public void FBReceived() { string jsonStr = AndroidMgr.GetMsg(); Dictionary <string, string> dic = new Dictionary <string, string>(); dic = JsonFx.Json.JsonReader.Deserialize <Dictionary <string, string> > (jsonStr); foreach (string key in dic.Keys) { Debug.Log(key + " : " + dic[key]); } }
public void FBReceived() { string jsonStr = AndroidMgr.GetMsg(); Dictionary <string, string> dic = new Dictionary <string, string>(); // dic = Newtonsoft.Json.JsonConvert.Deserialize<Dictionary<string, string>> (jsonStr); foreach (string key in dic.Keys) { Debug.Log(key + " : " + dic[key]); } }
public void OpenFacebook() { #if (UNITY_EDITOR) #elif (UNITY_ANDROID) AndroidMgr.OpenFB(new EventDelegate(this, "FBReceived")); #else #endif // if (mFBInitialized) { // FBLogin(); // } else{ // FB.Init (SetInit, FB.OnHideUnity); // } }
void OpenGallery() { CheckInGallery = true; Debug.Log("OpenGallery"); #if (UNITY_ANDROID) images = "file://" + AndroidMgr.GetMsg(); #else images = "file://" + IOSMgr.GetMsg(); #endif Debug.Log("images"); tLoad = new WWW(images); StartCoroutine(LoadImage(tLoad)); }
public void CompleteGCM() { Debug.Log("CompleteGCM"); string memUID = ""; #if (UNITY_EDITOR) #elif (UNITY_ANDROID) memUID = AndroidMgr.GetMsg(); #else #endif mMemInfo.MemUID = memUID; GetComponentInParent <ScriptTitle>().mProfileEvent = new GetProfileEvent(new EventDelegate(GetComponentInParent <ScriptTitle>(), "GotProfile")); NetMgr.JoinMember(mMemInfo, GetComponentInParent <ScriptTitle>().mProfileEvent); }
void OpenCamera() { ScriptItemPhoto sip = GetCurrentItemPhoto(); if (sip == null) { return; } if (Application.platform == RuntimePlatform.Android) { AndroidMgr.OpenCamera(new EventDelegate(this, "GotPhoto")); } else { } }
void ReceivedGallery() { Debug.Log("ReceivedGallery"); string image = ""; if (Application.platform == RuntimePlatform.Android) { image = "file://" + AndroidMgr.GetMsg(); } else { image = "file://" + IOSMgr.GetMsg(); } WWW www = new WWW(image); StartCoroutine(LoadImage(www)); }
public void CompleteGCM() { Debug.Log("CompleteGCM"); #if (UNITY_EDITOR) mMemInfo.MemUID = ""; mMemInfo.DeviceID = SystemInfo.deviceUniqueIdentifier; DoJoin(); #elif (UNITY_ANDROID) mMemInfo.MemUID = AndroidMgr.GetMsg(); mMemInfo.DeviceID = SystemInfo.deviceUniqueIdentifier; DoJoin(); #else mMemInfo.MemUID = IOSMgr.GetMsg(); EventDelegate eventd = new EventDelegate(this, "DoJoin"); IOSMgr.GetUID("", eventd); #endif }
// 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 }
public void GotUserImg() { string images; Debug.Log("OpenGallery"); if (Application.platform == RuntimePlatform.Android) { images = "file://" + AndroidMgr.GetMsg(); } else { images = "file://" + IOSMgr.GetMsg(); } Debug.Log("images"); WWW tLoad = new WWW(images); StartCoroutine(LoadImage2(tLoad)); }
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); } }
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(); } }
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 static void GetGalleryImages(EventDelegate eventDelegate) { Instance.mEventDelegate = eventDelegate; AndroidMgr.CallJavaFunc("GetGalleryImages", ""); }
public void GotUserImg() { string path = AndroidMgr.GetMsg(); //here we go!!!! }
public void GotPhoto() { string msg = AndroidMgr.GetMsg(); }
public static void GetHeightStatusBar() { AndroidMgr.CallJavaFunc("GetHeightStatusBar", ""); }
public void SetGCMId() { mLoginInfo.memUID = AndroidMgr.GetMsg(); NetMgr.DoLogin(mLoginInfo, mLoginEvent); }
public static void OpenFB(EventDelegate eventDelegate) { Instance.mEventDelegate = eventDelegate; AndroidMgr.CallJavaFunc("OpenFB", ""); }
public static void ViberateDevice(long millSec) { AndroidMgr.CallJavaFunc("ViberateDevice", string.Format("{0}", millSec)); }
public static void RegistGCM(EventDelegate eventDelegate) { Instance.mEventDelegate = eventDelegate; AndroidMgr.CallJavaFunc("RegisterGCM", ""); }