Example #1
0
    //*************************************************** 0630 yamaguchi dash finish
    IEnumerator fStart()
    {
        //********************************************************************* 0630 yamaguchi count down start
        cdCanvas = GameObject.Find ("CountDownText");
        cdText = cdCanvas.GetComponent<Text>();

        for (int i = 0; i < cnt; i++) {
            //print (i);
            cdText.text = (cnt - i - 1).ToString();
            //			Text target = cdCanvas.GetComponent<Text>();

            if(startFlg == 1){
                //break;
            }else{
                yield return new WaitForSeconds (1.0f);
            }
            //ここでカウントダウン用表示
        }

        fSendCountStart ();

        cdText.text = "GO";

        //********************************************************************* 0630 yamaguchi count down finish
        //*************************************************** 0702 kawashima changeGreen start
        startcube = GameObject.Find ("StartCube");
        startcubeanim = startcube.GetComponent<startCubeAnim> ();
        startcubeanim.fChangeGreen ();

        startbtnObj = GameObject.Find ("ButtonStart");
        if (startbtnObj != null) {
            startbtn = startbtnObj.GetComponent<StartBtn> ();
            startbtn.fStartBtnOff ();
        }

        //*************************************************** 0702 kawashima changeGreen finish
        fNextMove ();
    }
    //*************************************************** 0630 yamaguchi dash finish
    IEnumerator fStart()
    {
        GetComponent<Animator> ().SetBool ("isMove", true);

        //********************************************************************* 0630 yamaguchi count down start
        cdCanvas = GameObject.Find ("CountDownText");
        cdText = cdCanvas.GetComponent<Text>();

        if (cnt < 0) {
            while (startFlg!=1) {
                yield return new WaitForSeconds (0.01f);
            }
        }
        for (int i = 0; i < cnt; i++) {
            //print (i);
            cdText.text = (cnt - i - 1).ToString ();
            //			Text target = cdCanvas.GetComponent<Text>();
            //********************************************************************* 0713 kawashima countdown sound start
            if ((cnt - i - 1) == 3) {
                print ("時報スタート");
                Sounds.SEjihou ();
            }
            //********************************************************************* 0713 kawashima countdown sound end

            print ("時報");
            if (startFlg == 1) {
                break;
            } else {
                yield return new WaitForSeconds (1.0f);
            }
            //ここでカウントダウン用表示
        }

        fSendCountStart ();

        cdText.text = "GO";

        //********************************************************************* 0630 yamaguchi count down finish
        //*************************************************** 0702 kawashima changeGreen start
        startcube = GameObject.Find ("StartCube");
        startcubeanim = startcube.GetComponent<startCubeAnim> ();
        startcubeanim.fChangeGreen ();

        startbtnObj = GameObject.Find ("ButtonStart");
        if (startbtnObj != null) {
            startbtn = startbtnObj.GetComponent<StartBtn> ();
            startbtn.fStartBtnOff ();
        }

        //*************************************************** 0702 kawashima changeGreen finish
        fNextMove ();
    }