Beispiel #1
0
    private void DrawStandardStructureOptions(StructureController structure)
    {
        if (player == null)
        {
            return;
        }
        if (player.selectedEntity == null)
        {
            return;
        }
        if (structure == null)
        {
            return;
        }

        GUIStyle smallButtons = new GUIStyle();
        smallButtons.hover.background = smallButtonHover;
        smallButtons.active.background = smallButtonClick;
        GUI.skin.button = smallButtons;

        int leftEdge = BUILD_IMAGE_WIDTH + SCROLL_BAR_WIDTH + BUTTON_PADDING;
        int topEdge = buildAreaHeight - BUILD_IMAGE_HEIGHT / 2;
        int width = BUILD_IMAGE_WIDTH / 2;
        int height = BUILD_IMAGE_HEIGHT / 2;

        bool hasSpawnPoint = structure.HasValidSpawnPoint();
        if (hasSpawnPoint == false)
        {
            return;
        }

        SellButtonHandler(structure, leftEdge, topEdge, width, height);
        RallyPointButtonHandler(structure, leftEdge, topEdge, width, height);
    }