Пример #1
0
    public TileTageDataObject NewTileTageDataObject(string currentSelectedTile)
    {
        TileTageDataObject t = Instantiate <TileTageDataObject>(tiletag_prefab, panel.contentTransform);

        t.InitTagObj(currentSelectedTile, editPanel);

        t.dropdown.ClearOptions();

        int x = 0;

        // add all options here
        // select the approriate option


        for (int i = 0; i < editPanel.creationManager.currentCampaign.properties.Count; i++)
        {
            t.dropdown.options.Add(
                new TMPro.TMP_Dropdown.OptionData(editPanel.creationManager.currentCampaign.properties[i]));
        }

        t.dropdown.value = 0;


        TMP_Dropdown.OptionData[] temp = t.dropdown.options.ToArray();

        //for

        t.dropdown.RefreshShownValue();

        return(t);
    }
Пример #2
0
    public void OnNewTagClicked()
    {
        // delete new button
        if (newtag_button_instance != null)
        {
            Destroy(newtag_button_instance.gameObject);
        }

        //create tew tile tag objects
        TileTageDataObject obj = NewTileTageDataObject("");

        tag_buttons.Add(obj);

        // create new button
        PrintNewTileButton();
    }
Пример #3
0
    public void InitDisplay(EditTileTypesPanel editTileTypesPanel)
    {
        gameObject.SetActive(true);

        this.editPanel = editTileTypesPanel;

        ClearButtons();


        foreach (string ket in editPanel.GetCurrentTileType().attributes)
        {
            TileTageDataObject obj = NewTileTageDataObject(ket);
            tag_buttons.Add(obj);
        }

        PrintNewTileButton();
    }
Пример #4
0
    public void DestoryBUtton(TileTageDataObject obj)
    {
        tag_buttons.Remove(obj);

        Destroy(obj.gameObject);
    }