コード例 #1
0
    void CheckWinState()
    {
        bool hasWon = winChecker.CheckWinState(pegs);

        if (cheat || hasWon)
        {
            EndGame();
        }
        // Debug.Log("checking win state!");
        // if (cheat) EndGame();
        // int numCompleteTowers = 0;
        // foreach(GameObject peg in pegs) {
        //     if ((peg.GetComponent<PegScript>() as PegScript).HasCompleteTower()) {
        //         numCompleteTowers +=1;
        //     }
        // }
        // Debug.Log(numCompleteTowers);
        //  if (numCompleteTowers == 2) {
        //     EndGame();
        // }
    }