예제 #1
0
    private float _afterTime   = 0.0f;  // ゴール後タイムカウント

    // Update is called once per frame
    void Update()
    {
        if (goalFlag.CheckFinish())
        {
            Debug.Log("Spaceキーを押してリザルトへ");
            if (!_isCalledOnce)
            {
                if (_afterTime > 10.0f ||
                    Input.GetButtonDown("Decision"))
                {
                    Debug.Log("Result");
                    dispRanking.SetUpDispRanking("Battle", FindInfoByScene.Instance.GetPlayerNum, FindInfoByScene.Instance.GetLapMax(_activeStageName), false, 1000.0f);
                    resultCanvas.SetActive(true);
                    _isCalledOnce = true;
                }

                _afterTime += Time.deltaTime;
            }
            else
            {
                FinishGame();
            }
        }

        if (!_startCall)
        {
            if (!(startCounter.startWait))
            {
                Debug.Log("レーススタート");
                _startCall = true;
                timeCounter.StartCount();
            }
        }
    }
예제 #2
0
파일: TimeAttack.cs 프로젝트: mhigg/HCMs
    private float _afterTime   = 0.0f;  // ゴール後タイムカウント

    // Update is called once per frame
    void Update()
    {
        if (goalFlag.CheckFinish())
        {
            Debug.Log("Spaceキーを押してリザルトへ");
            if (!_isCalledOnce)
            {
                if (_afterTime > 10.0f ||
                    Input.GetButtonDown("Decision"))
                {
                    Debug.Log("Result");
                    // ランキング表示数は5+ランク外で6、最大周回数はコースごとに異なる
                    dispRanking.SetUpDispRanking(_activeStageName, 6, FindInfoByScene.Instance.GetLapMax(_activeStageName), true, 1000.0f);
                    resultCanvas.SetActive(true);
                    _isCalledOnce = true;
                }

                _afterTime += Time.deltaTime;
            }
            else
            {
                FinishGame();
            }
        }

        // 特定のタイミングでStartCountを呼ぶ
        if (!_startCall)
        {
            if (!(startCounter.startWait))
            {
                Debug.Log("レーススタート");
                _startCall = true;
                timeCounter.StartCount();
            }
        }
    }