コード例 #1
0
ファイル: Box.cs プロジェクト: roeechen01/Gandisweeper
    public void Uncover()
    {
        hidden = false;
        if (BoxManager.FIRST_MOVE)
        {
            boxManager.SetGandis(position);
            score.StartTime();
        }


        if (numGandis != 0 || gandi)
        {
            if (BoxManager.FIRST_MOVE)
            {
                BoxManager.FIRST_MOVE = false;
                boxManager.SetGandis(position);
                if (numGandis == 0)
                {
                    Show();
                    boxManager.UncoverEmptyBoxes(position);
                }
                else
                {
                    Show();
                }
            }
        }
        if (gandi)
        {
            Show();
            boxManager.Lose();
            sr.sprite = sprites[5];
        }

        else
        {
            BoxManager.FIRST_MOVE = false;
            if (numGandis == 0)
            {
                Show();
                boxManager.UncoverEmptyBoxes(position);
            }
            else
            {
                Show();
            }
        }
        if (!BoxManager.OVER)
        {
            boxManager.WinCheck();
        }
    }