Ejemplo n.º 1
0
    void FixedUpdate()
    {
        this.hp = GameObject.Find("HPGauge");
        hpc     = this.hp.GetComponent <HPController>();
        int hp = hpc.Rehp();

        if (hp == 0 || tf)
        {
            //Debug.Log(hp.DestroyHP());
            FadeOut(); //フェードアウト演出を行う関数の呼びだし
            tf = false;
        }
    }
Ejemplo n.º 2
0
    ///------------------------------------------------------
    /// <summary>
    /// ●1秒間に呼ばれる回数が一定で実行する関数.
    /// </summary>
    void FixedUpdate()
    {
        this.hp = GameObject.Find("HPGauge");
        hpc     = this.hp.GetComponent <HPController>();
        int hp = hpc.Rehp();

        if (hp == 0 || tf)
        {
            //Debug.Log(hp.DestroyHP());
            FadeOut(); //フェードアウト演出を行う関数の呼びだし
            tf = false;
        }
        if (hp == 0)
        {
            float nowtime = Time.fixedTime;
            if (fst)
            {
                syoki = nowtime;
                fst   = false;
            }
            Debug.Log(Time.fixedTime);
            if (nowtime < 0)
            {
                nowtime = 0;
            }
            floattaime += nowtime;
            if (syoki + 1 < nowtime)
            {
                syoki++;
                timecount++;
                this.targetText      = this.GetComponent <Text>();
                this.targetText.text = "" + retaime;
                retaime--;
            }
            if (retaime == 0)
            {
                SceneManager.LoadScene("main");
            }
        }
    }