Beispiel #1
0
    void Update()
    {
        switch (resultPhase)
        {
        case PHASE.PHASE_SHIPNORM: ShipNorm(); break;

        case PHASE.PHASE_DRUMROLL: DrumRoll(); break;

        case PHASE.PHASE_JUDGE: Judge(); break;

        case PHASE.PHASE_RETURNTITLE: ReturnToTitle(); break;
        }

        if (BackFlagProp)
        {
            if (!ready1pFlag)
            {
                tColorChange1p.TextFade();
            }
            if (!ready2pFlag)
            {
                tColorChange2p.TextFade();
            }

            if (ready1pFlag)
            {
                if (ready1pText.text == "1P Ready")
                {
                    return;
                }
                ready1pText.text  = "1P Ready";
                ready1pText.color = new Color(ready1pText.color.r, ready1pText.color.g, ready1pText.color.b, 1.0f);
            }
            if (ready2pFlag)
            {
                if (ready2pText.text == "2P Ready")
                {
                    return;
                }
                ready2pText.text  = "2P Ready";
                ready2pText.color = new Color(ready2pText.color.r, ready2pText.color.g, ready2pText.color.b, 1.0f);
            }
        }
    }
    // Update is called once per frame
    private void Update()
    {
        //// 1P, 2Pのフラグが立っている間のみチェックマークを表示
        //check1p.SetActive(is1pFlag);
        //check2p.SetActive(is2pFlag);

        if (!Is1pFlag)
        {
            textColorChange1.TextFade();
        }

        if (!Is2pFlag)
        {
            textColorChange2.TextFade();
        }

        if (!Is1pFlag && !Is2pFlag)
        {
            return;
        }

        if (Is1pFlag)
        {
            if (readyState1p.text != "1P Ready")
            {
                readyState1p.text  = "1P Ready";
                readyState1p.color = new Color(readyState1p.color.r, readyState1p.color.g, readyState1p.color.b, 1f);
                soundManager.Instance.PlaySound(0, false);
            }
        }

        if (Is2pFlag)
        {
            if (readyState2p.text != "2P Ready")
            {
                readyState2p.text  = "2P Ready";
                readyState2p.color = new Color(readyState2p.color.r, readyState2p.color.g, readyState2p.color.b, 1f);
                soundManager.Instance.PlaySound(0, false);
            }
        }

        if (Is1pFlag && Is2pFlag)
        {
            if (!howTo.activeSelf)
            {
                Is1pFlag = false;
                Is2pFlag = false;

                titleLogo.SetActive(false);
                howTo.SetActive(true);
                howtoIcon.sprite = howtoSprite[0];

                Invoke("HowToVisible", 0.2f);
            }
            else if (howTo.activeSelf && !isEndHoeTo)
            {
                Is1pFlag = false;
                Is2pFlag = false;

                isEndHoeTo       = true;
                howtoIcon.sprite = howtoSprite[1];
            }
            else if (howTo.activeSelf && isEndHoeTo)
            {
                Invoke("SceneChange", 0.5f);
            }
        }
    }