Ejemplo n.º 1
0
    void Ready()
    {
        gameState = gameStateInfo.isReady;

        // 全てのオブジェクトを無効化
        player.setGravity(false);
        blocks.SetActive(false);
        gameScore = 0;
    }
Ejemplo n.º 2
0
    void gameStart()
    {
        gameState = gameStateInfo.isPlay;

        player.setGravity(true);
        blocks.SetActive(true);

        // Startの一回だけおまけ
        player.upVector();
    }
Ejemplo n.º 3
0
    void gameOver()
    {
        gameState = gameStateInfo.isGameOver;

        // 全てのオブジェクトを検索
        ScrollBackground[] scrollObjects = GameObject.FindObjectsOfType <ScrollBackground>();

        // 全てのオブジェクト停止
        foreach (ScrollBackground so in scrollObjects)
        {
            so.enabled = false;
        }
        StartCoroutine("toResultSceneCoroutine");
    }