Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (player == null)
        {
            return;
        }

        if (air > 0)
        {
            if (slider.value < lastAir / maxAir)
            {
                camShake.CamShake();
                string sentences = "Hurry Up Mr. Astronaut \n Your Air Is Over";
                gameManage.startDialog(sentences);
                air         -= Time.deltaTime * airBunrnRate;
                slider.value = air / maxAir;
            }
            else
            {
                camShake.StopCamShake();
                air         -= Time.deltaTime * airBunrnRate;
                slider.value = air / maxAir;
            }
        }
    }