Пример #1
0
    private void Update()
    {
        if (targetObject == null)
        {
            return;                       // ターゲットが無い場合
        }
        currentTime += Time.deltaTime;

        if (isLife)
        {
            Alive();
            return;
        }

        if (delay < currentTime && playSystem.GetHeroStopFlag())
        {
            ComparePosition();
            isLife = !isLife;
            rippleParticle.SetActive(isLife);
            touchHand.SetActive(isLife);
            touchHand.GetComponent <TapToStart>().StartThisCoroutine();
            currentTime = 0.0f;
        }

        if (!playSystem.GetHeroStopFlag() || playSystem.GetMenuPauseFlag())
        {
            isLife = false;
            rippleParticle.SetActive(isLife);
            touchHand.SetActive(isLife);
        }
    }
Пример #2
0
    IEnumerator DisplayTutorial()
    {
        while (!isActivated)
        {
            Debug.Log("Start of Iteration");
            switch (index)
            {
            case 0:
                Debug.Log("entering case");
                for (int i = 0; i < tutorials.Length; i++)
                {
                    Debug.Log("entering for" + i);
                    if (i == index)
                    {
                        tutorials[index].SetActive(true); Debug.Log("Activated");
                    }
                    else
                    {
                        tutorials[i].SetActive(false);
                    }
                }

                yield return(StartCoroutine(WaitForKeyDown()));

                break;

            case 1:
                for (int i = 0; i < tutorials.Length; i++)
                {
                    if (i == index)
                    {
                        tutorials[index].SetActive(true);
                    }
                    else
                    {
                        tutorials[i].SetActive(false);
                    }
                }

                yield return(StartCoroutine(WaitForKeyDown()));

                break;

            case 2:
                for (int i = 0; i < tutorials.Length; i++)
                {
                    if (i == index)
                    {
                        tutorials[index].SetActive(true);
                    }
                    else
                    {
                        tutorials[i].SetActive(false);
                    }
                }

                yield return(StartCoroutine(WaitForKeyDown()));

                break;
            }

            if (index <= 2)
            {
                Debug.Log("End of iteration"); yield return(new WaitForEndOfFrame());
            }
            else
            {
                playSystem.TranslucentPanelControl(false);
                isActivated = true;
                Debug.Log("play System " + playSystem.GetHeroStopFlag());
                Debug.Log("pause Flag " + playSystem.GetMenuPauseFlag());
                Debug.Log("Game Progress " + playSystem.GetProgress());

                foreach (GameObject x in tutorials)
                {
                    x.SetActive(false);
                }

                //Destroy(gameObject);
            }
        }
    }