Ejemplo n.º 1
0
    public void GameOver()  //遊戲失敗函式,以ShipController呼叫
    {
        Instantiate(BoomSound);
        IsPlaying = false;
        HpText.SetActive(false);
        ReButtonSmall.SetActive(false);
        ReTextSmall.SetActive(false);
        ExitButtonSmall.SetActive(false);
        ExitTextSmall.SetActive(false);

        OverTitle.SetActive(true);
        ReButton.SetActive(true);
        ReText.SetActive(true);
        ExitButton.SetActive(true);
        ExitText.SetActive(true);
    }
Ejemplo n.º 2
0
    void Succeed()   //通關函式,在通關後一小段間隔跳出通關文字
    {
        EndTime += Time.deltaTime;

        if (EndTime > 1)
        {
            ReButtonSmall.SetActive(false);
            ReTextSmall.SetActive(false);
            ExitButtonSmall.SetActive(false);
            ExitTextSmall.SetActive(false);

            GoodText.SetActive(true);
            ReButton.SetActive(true);
            ReText.SetActive(true);
            ExitButton.SetActive(true);
            ExitText.SetActive(true);
        }
    }