Пример #1
0
    private void OnTriggerExit(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            plms.curveFlg    = false;
            plms.autoRunVec  = curveVector.ToString();
            perDistanceToEnd = 1f;


            //出た時に速度リセット
            switch (curveVector)
            {
            case CurveVector.front:
            case CurveVector.back:
                plms.runSpd = new Vector3(0f, 0f, this.name == "back" ? -plms.RunSpeed : plms.RunSpeed);
                break;

            case CurveVector.right:
            case CurveVector.left:
                plms.runSpd = new Vector3(this.name == "left" ? -plms.RunSpeed : plms.RunSpeed, 0f, 0f);
                break;
            }

            VirtualCameraOff();
            eccr.CameraPosReset();

            //anim.enabled = true;
        }
    }
Пример #2
0
    private void FixedUpdate()
    {
        currentFramerate = (int)(1f / Time.deltaTime);      //現在のフレームレート近似値

        aaa = blackOutImage.color.a;                        //暗転用画像のアルファ値

        blackOut.SetFloat("BlackOutAlphaValue", aaa);       //暗転アニメーション開始

        if (aaa == 1f && blackOutFlg == false)
        {
            Retry();
            blackOut.SetTrigger("EndBlackOut");
            CoinLoad();
            blackOutFlg = true;
        }

        if (aaa == 0 && blackOutFlg == true)
        {
            blackOut.SetTrigger("FinishBlackOut");
            blackOutFlg = false;
            Debug.Log("unnko");
            aaa = 0f;
        }

        //if (Input.GetKeyDown(KeyCode.R))
        //    SceneManager.LoadScene("MainScene");

        if (plms.curveFlg == false)
        {
            switch (plms.autoRunVec)
            {
            case "front":
                CameraOnOff(1, 0, 0, 0);
                break;

            case "right":
                CameraOnOff(0, 1, 0, 0);
                break;

            case "left":
                CameraOnOff(0, 0, 1, 0);
                break;

            case "back":
                CameraOnOff(0, 0, 0, 1);
                break;
            }
        }


        if (CoinBar.value >= 1.0f)
        {
            CoinBar.value = 0f;
            coinsScore   += 100;
        }

        if (GameClearText.enabled == true)
        {
            //tr.SetValue(coinCount, 0, sco);
            //SceneManager.LoadScene("ResultScene");
        }

        eccr.CameraPosReset();
    }