Example #1
0
    void Start()
    {
        GenerateButtonList();

        selectedButtonData = GetSelectionGroupData(defaultSelectionGroup);

        speciesPoolGenomeTex            = new Texture2D(16, 16, TextureFormat.RGBA32, false);
        speciesPoolGenomeTex.filterMode = FilterMode.Point;
        speciesPoolGenomeTex.wrapMode   = TextureWrapMode.Clamp;
        speciesPoolGenomeMat.SetTexture("_MainTex", speciesPoolGenomeTex);
    }
Example #2
0
    public void ChangeSelectedGenome(SelectionGroup group, int index)
    {
        SpeciesGenomePool pool = simulationManager.GetSelectedGenomePool();

        //selectionManager.SetFocusedCandidateGenome(pool, group, index);
        selectedButtonData = GetSelectionGroupData(group);

        uiManager.historyPanelUI.buttonSelCreatureEventsLink.gameObject.transform.localPosition = new Vector3(360f, 180f, 0f);

        if (group == SelectionGroup.Candidates)
        {
            selectionManager.SetSelected(pool.candidateGenomesList[index]);
        }

        if (selectedButtonData != null && selectedButtonData.image != null)
        {
            selectedButtonData.image.color = Color.white;
            // new Vector3(selectedButtonData.image.rectTransform.localPosition.x + 24f, selectedButtonData.image.rectTransform.localPosition.y, 0f);
        }
        panelGenomeViewer.SetActive(true);

        //uiManager.historyPanelUI.buttonSelCreatureEventsLink.GetComponent<RectTransform>().localPosition = Vector3.one * 4.2f;
    }