private void Init_Form() { _form_cb = GetComponent <Combo_Form>(); if (_form_cb != null) { _form_cb.Add_ButtonToForm(_form_cb.prefabButton, "_btnAddVert_", new Vector3(2.5f, 0.1f, 0)); //_form_cb.Add_ButtonToForm(_form_cb.prefabButton, "_btnDijkstra", new Vector3(2.5f, 0.1f, 0)); if (_form_cb.Lista.Count >= 1) { _btnAddVert = _form_cb.Lista[0]; } if (_form_cb.Lista.Count >= 2) { _btnDijkstra = _form_cb.Lista[1]; } } if (_btnAddVert != null) { _btnAddVert.Init_Delegates(null, null, _btnAddVert_ClickUp, null, null, null, null, null, null, null, null, null); GameObject Text = Instantiate <GameObject>(_form_cb.prefabText.gameObject, _btnAddVert.transform); if (Text != null) { Text T = Text.GetComponent <Text>(); if (T != null) { T.text = "+"; } } } if (_btnDijkstra != null) { _btnDijkstra.Init_Delegates(null, null, _btnDijkstra_ClickUp, null, null, null, null, null, null, null, null, null); GameObject Text = Instantiate <GameObject>(_form_cb.prefabText.gameObject, _btnDijkstra.transform); if (Text != null) { Text T = Text.GetComponent <Text>(); if (T != null) { T.text = "D"; } } } }
void Start() { _obiekt = GetComponent <Obiekt>(); _form = GetComponent <Combo_Form>(); _zaznaczacz = GameObject.Find("Baza").GetComponent <Zaznaczacz>(); _baza = _zaznaczacz.gameObject.GetComponent <Baza>(); ParentEdges = _baza.gameObject.transform.GetChild(1).gameObject; if (_zaznaczacz != null) { Zdarzenie.InitDelegate(ref _zaznaczacz.SelectionChanged, SelectionChanged); } Init_Dijkstra(); }