示例#1
0
文件: HangarUI.cs 项目: lwsn/SPACE
    void SpecificPart(int active)
    {
        if (selectedPartID < 0)
        {
            return;
        }

        selectedPartType(selectedPartIndex);

        column++;
        //float width = Camera.main.pixelWidth - columnWidth * column;

        if (shipbuilder.IsBought(selectedPartID))
        {
            if (GUI.Button(new Rect(Camera.main.pixelWidth - columnWidth - 5, Camera.main.pixelHeight - rowHeight - 5, columnWidth, rowHeight), "Equip"))
            {
                shipbuilder.Equip(selectedPartID);
            }
        }
        else if (shipbuilder.IsUnlocked(selectedPartID))
        {
            if (GUI.Button(new Rect(Camera.main.pixelWidth - columnWidth - 5, Camera.main.pixelHeight - rowHeight - 5, columnWidth, rowHeight), "Buy - " + 999))
            {
                shipbuilder.Buy(selectedPartID);
            }
        }
    }