Exemplo n.º 1
0
    // バー生成NGとボタン表示関数を作る
    private void CreateButton()
    {
        // ノーマルモード
        if (SaveClass.GetGameMode())
        {
            // バーを生成できなくする
            SaveClass.SetIsDraw(false);

            // ボタンを出す
            Instantiate(loadToNormalGame, canvas.transform);
            Instantiate(loadToMenu, canvas.transform);
        }
        // Infiniteモード
        else
        {
            // バーを生成できなくする
            SaveClass.SetIsDraw(false);

            // ボタンを出す
            Instantiate(loadToInfiniteGame, canvas.transform);
            Instantiate(loadToMenu, canvas.transform);

            // CreateInputField();
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// カウントダウンを管理するコルーチン
    /// </summary>
    /// <returns>カウント</returns>
    private IEnumerator Countdown()
    {
        CountdownText.text = ("GetReady?");
        yield return(new WaitForSeconds(1.0f));

        CountdownText.text = ("3");
        yield return(new WaitForSeconds(1.0f));

        CountdownText.text = ("2");
        yield return(new WaitForSeconds(1.0f));

        CountdownText.text = ("1");
        yield return(new WaitForSeconds(1.0f));

        CountdownText.text = ("GO!!");
        yield return(new WaitForSeconds(1.0f));

        // ゲーム開始
        GameStart = true;

        // 線を引けるようにする
        SaveClass.SetIsDraw(true);

        // 時間経過でテキストを消す
        CountdownText.GetComponent <Text>().enabled = false;
    }