コード例 #1
0
    void CheckerEditor()
    {
        Rect buttonRect = ButtonRect(20, checkerOnTheLenght, position.size.y - 28, checkerOnTheHeight, 20);

        buttonRect.y -= buttonRect.size.y;
        int index = 0;

        for (int y = checkerOnTheHeight; y > 0; y--)
        {
            if (y != checkerOnTheHeight)
            {
                buttonRect.y -= buttonRect.size.y + 5;
            }

            buttonRect.x = 20;

            for (int x = 0; x < checkerOnTheLenght; x++)
            {
                if (x != 0)
                {
                    buttonRect.x += buttonRect.size.x + 5;
                }
                if (GUI.Button(buttonRect, "" + index))
                {
                    skinCellVue         = true;
                    currentGround       = checker[index];
                    currentHeightGround = currentGround.GetComponent <GroundBaseGenerator>().HeightChecker;
                    skinCheckerVue      = false;
                }
                index++;
            }
        }
    }