Exemplo n.º 1
0
    public IEnumerator GuestShow()
    {
        DeActiveObj.SetActive(false);
        int nGuestCount = 0;


        while (nGuestCount != 5)
        {
            SpawnManager.Instance.CreateCharacter();
            yield return(new WaitForSeconds(0.3f));

            nGuestCount++;
        }

        tutorialImage_Obj.SetActive(true);
        tutorial_Image.gameObject.SetActive(true);
        tutorial_Image.enabled = true;
        ShowTutorialImage(0);

        eTutorialState = TutorialOrder.E_TUTORIAL_START_IMAGE01;
    }
Exemplo n.º 2
0
    public void StartContent()
    {
        if (eTutorialState == TutorialOrder.E_TUTORIAL_NONE)
        {
            button.GetComponent <Button> ().onClick.AddListener(StartGoShowOpen);
            eTutorialState           = TutorialOrder.E_TUTORIAL_START_FULLSCREENTALK01;
            playerTalk.tutorialPanel = this;

            SpawnManager.Instance.tutorialPanel.tutorialImage_Obj.SetActive(false);
            SpawnManager.Instance.tutorialPanel.tutorial_Image.gameObject.SetActive(false);
            SpawnManager.Instance.tutorialPanel.tutorial_Image.enabled = false;
        }
        else
        {
            eTutorialState = TutorialOrder.E_TUTORIAL_START_DAYS;
        }

        strTutorialImage_path[0] = "Tutorial/Tutorial01";
        strTutorialImage_path[1] = "Tutorial/Tutorial02";
        strTutorialImage_path[2] = "Tutorial/Tutorial03";
        strTutorialImage_path[3] = "Tutorial/Tutorial04";
        StartCoroutine(startText());
    }
Exemplo n.º 3
0
    public IEnumerator FullScreenText02StartTime(float _time)
    {
        float fTime = _time;

        while (true)
        {
            fTime -= Time.deltaTime;
            if (fTime <= 0)
            {
                if (eTutorialState == TutorialOrder.E_TUTORIAL_START_FULLSCREENTALK02)
                {
                    text01.text    = "";
                    text02.text    = "";
                    eTutorialState = TutorialOrder.E_TUTORIAL_START_DRAGONSHOW;
                    SpawnManager.Instance.StartBossCreate(4);
                    StartTutorialFullScreenTextPanelAlpha(TutorialOption.E_TUTORIAL_OPTION_FADEOUT);
                }
                yield break;
            }

            yield return(null);
        }
    }
Exemplo n.º 4
0
    public IEnumerator TutorialFullScreenTextPanelAlpha(TutorialOption _option)
    {
        m_fTutorialFullScrreneAlpha = DeActiveObj_Image.color.a;
        while (true)
        {
            //fade in
            if (_option == TutorialOption.E_TUTORIAL_OPTION_FADEIN)
            {
                //Debug.Log ("Fade In!!");
                m_fTutorialFullScrreneAlpha += Time.deltaTime * m_fAlphaValue;
                originColor             = new Color(DeActiveObj_Image.color.r, DeActiveObj_Image.color.g, DeActiveObj_Image.color.b, m_fTutorialFullScrreneAlpha);
                DeActiveObj_Image.color = originColor;


                if (m_fTutorialFullScrreneAlpha >= 1f && eTutorialState == TutorialOrder.E_TUTORIAL_START_FULLSCREENTALK02)
                {
                    //Text go
                    StartFullScreenText();
                    yield break;
                }


                if (m_fTutorialFullScrreneAlpha >= 1f && eTutorialState == TutorialOrder.E_TUTORIAL_START_DAYS)
                {
                    SpawnManager.Instance.tutorialPanel.StartContent();
                    yield break;
                }
            }
            //fade out
            else
            {
                //Debug.Log ("Fade Out!!");
                m_fTutorialFullScrreneAlpha -= Time.deltaTime * m_fAlphaValue;
                originColor             = new Color(DeActiveObj_Image.color.r, DeActiveObj_Image.color.g, DeActiveObj_Image.color.b, m_fTutorialFullScrreneAlpha);
                DeActiveObj_Image.color = originColor;
                if (m_fTutorialFullScrreneAlpha <= 0f && eTutorialState == TutorialOrder.E_TUTORIAL_START_FULLSCREENTALK01)
                {
                    eTutorialState = TutorialOrder.E_TUTORIAL_START_PLAYERTALKBOX01;
                    playerTalk.TalkBoxOnOff(true);
                    playerTalk.StartPlayerTalk(0);
                    DeActiveObj.SetActive(false);
                    yield break;
                }



                //보스등장
                if (m_fTutorialFullScrreneAlpha <= 0f && eTutorialState == TutorialOrder.E_TUTORIAL_START_DRAGONSHOW)
                {
                    playerTalk.TalkBoxOnOff(false);
                    DeActiveObj.SetActive(false);


                    eTutorialState = TutorialOrder.E_TUTORIAL_START_DRAGONTALKBOX01;
                    yield break;
                }

                if (m_fTutorialFullScrreneAlpha <= 0f && eTutorialState == TutorialOrder.E_TUTORIAL_START_IMAGE03)
                {
                    DeActiveObj.SetActive(false);

                    SpawnManager.Instance.tutorialPanel.tutorialImage_Obj.SetActive(true);
                    SpawnManager.Instance.tutorialPanel.tutorial_Image.gameObject.SetActive(true);
                    SpawnManager.Instance.tutorialPanel.tutorial_Image.enabled = true;
                    ShowTutorialImage(2);
                    yield break;
                }
            }
            yield return(null);
        }
    }
Exemplo n.º 5
0
    public IEnumerator startText()
    {
        int    nCount       = strText01.Length + strText02.Length;
        int    nIndex       = 0;
        int    nIndex2      = 0;
        string strGetText01 = "";
        string strGetText02 = "";

        while (true)
        {
            yield return(new WaitForSeconds(0.07f));

            if (eTutorialState == TutorialOrder.E_TUTORIAL_START_FULLSCREENTALK01)
            {
                //Debug.Log("Before Dragon");
                //End Condition
                if (nIndex + nIndex2 >= nCount)
                {
                    SpawnManager.Instance.uiManager.SetTutorial(true);
                    button.SetActive(true);
                    button.GetComponentInChildren <Text> ().text = "일하러 가기";
                    yield break;
                }
                if (nIndex < strText01.Length)
                {
                    strGetText01 += strText01 [nIndex];
                    text01.text   = strGetText01;
                    nIndex++;
                }
                else
                {
                    strGetText02 += strText02 [nIndex2];
                    text02.text   = strGetText02;
                    nIndex2++;
                }
            }
            //
            if (eTutorialState == TutorialOrder.E_TUTORIAL_START_FULLSCREENTALK02)
            {
                if (nIndex + nIndex2 >= strText03.Length + strText04.Length)
                {
                    StartFullScreenTime(2f);
                    yield break;
                }
                if (nIndex < strText03.Length)
                {
                    strGetText01 += strText03 [nIndex];
                    text01.text   = strGetText01;
                    nIndex++;
                }
                else
                {
                    strGetText02 += strText04 [nIndex2];
                    text02.text   = strGetText02;
                    nIndex2++;
                }
            }


            if (eTutorialState == TutorialOrder.E_TUTORIAL_START_DAYS)
            {
                //Debug.Log("affer Dragon");
                //End Condition
                if (nIndex + nIndex2 >= strText05.Length + strText06.Length)
                {
                    SpawnManager.Instance.uiManager.SetTutorial(false);
                    SpawnManager.Instance.balckSmithSetting.SettingSmith(1);

                    eTutorialState = TutorialOrder.E_TUTORIAL_START_IMAGE03;
                    button.GetComponent <Button> ().onClick.RemoveAllListeners();
                    button.GetComponent <Button> ().onClick.AddListener(StartDays10);

                    button.SetActive(true);
                    button.GetComponentInChildren <Text> ().text = "게임하기";
                    yield break;
                }

                if (nIndex < strText05.Length)
                {
                    strGetText01 += strText05 [nIndex];
                    text01.text   = strGetText01;
                    nIndex++;
                }

                else
                {
                    strGetText02 += strText06 [nIndex2];
                    text02.text   = strGetText02;
                    nIndex2++;
                }
            }
        }
    }