//인증여부 확인 public static void LogIn(voidFunc successFunc = null, voidFunc failFunc = null) { #if UNITY_ANDROID && !UNITY_EDITOR Debug.Log("login"); Social.localUser.Authenticate((bool success) => { if (success) { Debug.Log("login success"); if (successFunc != null) { successFunc(); } // to do ... // 구글 플레이 게임 서비스 로그인 성공 처리 } else { Debug.Log("login fail"); if (failFunc != null) { failFunc(); } // to do ... // 구글 플레이 게임 서비스 로그인 실패 처리 } }); #else successFunc(); #endif }
public static void FadeIn(float time, voidFunc func = null) { if (!IsExist()) { return; } fade.StartCoroutine(fade.FadeInRoutine(time, func)); }
public static void FadeOutIn(float time, float waitTime = 0, voidFunc func = null, voidFunc endFunc = null) { if (!IsExist()) { return; } fade.StartCoroutine(fade.FadeOutInRoutine(time, waitTime, func, endFunc)); }
public void On(voidFunc OnEnd) { onEnd = OnEnd; image = transform.Find("Image").GetComponent <Image>(); anim = transform.Find("Anim").GetComponent <Animator>(); gameObject.SetActive(true); anim.Play("default"); StartCoroutine(StartIntro()); }
public void OnDiaryButtonDown() { if (!isBtnEnable) { return; } ButtonDown(); voidFunc checkNew = new voidFunc(CheckNew); diary.On(checkNew); }
private IEnumerator FadeOutInRoutine(float time, float waitTime, voidFunc middleFunc = null, voidFunc endFunc = null) { image.color = new Color(image.color.r, image.color.g, image.color.b, 0f); text.color = new Color(text.color.r, text.color.g, text.color.b, 0f); //fade.gameObject.SetActive(true); Color DefaultCol = image.color; Color col = image.color; Color DefaultTextCol = text.color; Color textCol = text.color; float curtime = 0f; while (col.a < 1) { col = image.color; textCol = text.color; curtime += Time.deltaTime; col.a = Mathf.Lerp(DefaultCol.a, 1, curtime / time); textCol.a = Mathf.Lerp(DefaultTextCol.a, 1, curtime / time); image.color = col; text.color = textCol; yield return(null); } if (middleFunc != null) { middleFunc(); } yield return(new WaitForSeconds(waitTime)); DefaultCol = image.color; col = image.color; DefaultTextCol = text.color; textCol = text.color; curtime = 0f; while (col.a > 0) { col = image.color; textCol = text.color; curtime += Time.deltaTime; col.a = Mathf.Lerp(DefaultCol.a, 0, curtime / time); textCol.a = Mathf.Lerp(DefaultTextCol.a, 0, curtime / time); image.color = col; text.color = textCol; yield return(null); } if (endFunc != null) { endFunc(); } gameObject.SetActive(false); }
/// <summary> /// 로드시에 부르는 메소드 /// </summary> public static void LoadAll(bool isCloud, voidFunc onCloudLoadComplete = null, voidFunc onCloudLoadFail = null) { OnCloudLoadCompleteEvent += onCloudLoadComplete; OnCloudLoadFailEvent += onCloudLoadFail; byte[] binary = BinaryLocalLoad(SaveManager.FileName, SaveManager.Path); if (binary != null) { string json = Encoding.UTF8.GetString(binary); saveData = JsonConvert.DeserializeObject <SaveData>(json); Debug.Log("Local Save Loaded" + json); } ApplySave(); if (isCloud) { GooglePlayManager.LoadFromCloud(FileName); } }
IEnumerator FadeInRoutine(float time, voidFunc func) { //fade.gameObject.SetActive(true); Color DefaultCol = fade.color; Color col = fade.color; float curtime = 0f; while (col.a > 0) { col = fade.color; curtime += Time.deltaTime; col.a = Mathf.Lerp(DefaultCol.a, 0, curtime / time); fade.color = col; yield return(null); } if (func != null) { func(); } //fade.gameObject.SetActive(false); }
public IEnumerator FadeOutInRoutine(float time, float waitTime, voidFunc middleFunc, voidFunc endFunc) { BeforeRoutine(); fade.color = new Color(fade.color.r, fade.color.g, fade.color.b, 0f); //fade.gameObject.SetActive(true); Color DefaultCol = fade.color; Color col = fade.color; float curtime = 0f; while (col.a < 1) { col = fade.color; curtime += Time.deltaTime; col.a = Mathf.Lerp(DefaultCol.a, 1, curtime / time); fade.color = col; yield return(null); } if (middleFunc != null) { middleFunc(); } yield return(new WaitForSeconds(waitTime)); DefaultCol = fade.color; col = fade.color; curtime = 0f; while (col.a > 0) { col = fade.color; curtime += Time.deltaTime; col.a = Mathf.Lerp(DefaultCol.a, 0, curtime / time); fade.color = col; yield return(null); } if (endFunc != null) { endFunc(); } //fade.gameObject.SetActive(false); }
public IEnumerator FadeOutRoutine(float time, voidFunc func) { BeforeRoutine(); //fade.gameObject.SetActive(true); fade.color = new Color(fade.color.r, fade.color.g, fade.color.b, 0f); Color DefaultCol = fade.color; Color col = fade.color; float curtime = 0f; while (col.a < 1) { col = fade.color; curtime += Time.deltaTime; col.a = Mathf.Lerp(DefaultCol.a, 1, curtime / time); fade.color = col; yield return(null); } if (func != null) { func(); } //fade.gameObject.SetActive(false); }
public void FadeIn(float time, voidFunc func) { StartCoroutine(FadeInRoutine(time, func)); }
public void FadeInOut(float time, float waitTime, voidFunc func, voidFunc endFunc) { StartCoroutine(FadeInOutRoutine(time, waitTime, func, endFunc)); }
public void SaveUIOn(voidFunc OnSave = null) { onSave = OnSave; transform.localPosition = new Vector3(0, 0, 0); }
private void btnStartWebCam_Click(object sender, EventArgs e) { if (frmFilter == null || frmFilter.IsDisposed) frmFilter = new frmCfgFilter(); frmFilter.Show(); filterWebCam = frmFilter.GetFilters(); FilterInfoCollection devs = new FilterInfoCollection(FilterCategory.VideoInputDevice); delegRefreshPic = RefreshPic; vcd = new VideoCaptureDevice(devs[0].MonikerString); vcd.NewFrame += new NewFrameEventHandler(vcd_NewFrame); vcd.DesiredFrameSize = new Size(600, 400); vcd.Start(); }
public void SaveUIOn(voidFunc OnSave) { saveUI.SaveUIOn(OnSave); }
public void FadeInOut(float time, voidFunc func) { StartCoroutine(FadeInOutRoutine(time, 0f, func, null)); }
public void DeleteSkillFunc(Skill skill, voidFunc func) { OnUsingSkill[(int)skill] -= func; }
public void AddSkillFunc(Skill skill, voidFunc func) { OnUsingSkill[(int)skill] += func; }