コード例 #1
0
    private void SellButtonHandler(StructureController structure, int leftEdge, int topEdge, int width, int height)
    {
        Texture2D sellIcon = structure.sellIcon;
        leftEdge += width + BUTTON_PADDING;

        bool buttonPressed = GUI.Button(new Rect(leftEdge, topEdge, width, height), sellIcon);
        if (buttonPressed == false)
        {
            return;
        }

        structure.Sell();
    }