예제 #1
0
    //인증여부 확인

    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
    }
예제 #2
0
 public static void FadeIn(float time, voidFunc func = null)
 {
     if (!IsExist())
     {
         return;
     }
     fade.StartCoroutine(fade.FadeInRoutine(time, func));
 }
예제 #3
0
 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));
 }
예제 #4
0
 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());
 }
예제 #5
0
    public void OnDiaryButtonDown()
    {
        if (!isBtnEnable)
        {
            return;
        }
        ButtonDown();
        voidFunc checkNew = new voidFunc(CheckNew);

        diary.On(checkNew);
    }
예제 #6
0
    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);
    }
예제 #7
0
 /// <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);
     }
 }
예제 #8
0
    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);
    }
예제 #9
0
    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);
    }
예제 #10
0
    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);
    }
예제 #11
0
 public void FadeIn(float time, voidFunc func)
 {
     StartCoroutine(FadeInRoutine(time, func));
 }
예제 #12
0
 public void FadeInOut(float time, float waitTime, voidFunc func, voidFunc endFunc)
 {
     StartCoroutine(FadeInOutRoutine(time, waitTime, func, endFunc));
 }
예제 #13
0
 public void SaveUIOn(voidFunc OnSave = null)
 {
     onSave = OnSave;
     transform.localPosition = new Vector3(0, 0, 0);
 }
예제 #14
0
파일: Form1.cs 프로젝트: yeerkkiller1/Go-AI
        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();
        }
예제 #15
0
 public void SaveUIOn(voidFunc OnSave)
 {
     saveUI.SaveUIOn(OnSave);
 }
예제 #16
0
 public void FadeInOut(float time, voidFunc func)
 {
     StartCoroutine(FadeInOutRoutine(time, 0f, func, null));
 }
예제 #17
0
 public void DeleteSkillFunc(Skill skill, voidFunc func)
 {
     OnUsingSkill[(int)skill] -= func;
 }
예제 #18
0
 public void AddSkillFunc(Skill skill, voidFunc func)
 {
     OnUsingSkill[(int)skill] += func;
 }