public void Create_EdgeButton(string NewName, Vector3 WantedOffset) { GameObject NowyGuzik; NowyGuzik = _form.Add_ButtonToForm(_form.prefabButton, NewName, WantedOffset, false); GameObject Napis; Napis = Instantiate(_form.prefabText.gameObject, NowyGuzik.transform); Text T = Napis.GetComponent <Text>(); T.text = "Edge"; T.color = Color.green; Obiekt NG_obiekt = NowyGuzik.GetComponent <Obiekt>(); if (NG_obiekt != null) { Buttons.Add(NG_obiekt); NG_obiekt.Init_Delegates(null, null, EdgeButton_Click, null, null, null, null, null, null, null, null, null); } }
void Start() { rMesh = GetComponent <Renderer>(); SetCurrentTexture(Neutral); _obiekt = GetComponent <Obiekt>(); if (_obiekt != null) { _obiekt.Init_Delegates(Lewy_Click, Lewy_ClickDown, Lewy_ClickUp, null, null, null, Mysz_Hover, Mysz_Leave, null, null, null, null); } }
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() { GetComponent <Renderer>().material.mainTexture = Textury[1]; _obiekt = GetComponent <Obiekt>(); _obiekt.Init_Delegates(null, null, null, null, null, Right_ClickUp, null, null, null, null, null, null); transform.localPosition = StartPosition; MoveTill_Start(transform); if (_autoHide) { AutoHideTimer = 0; } }
void Start() { _baza = GameObject.Find("Baza").GetComponent <Baza>(); bIsDragging = false; _obiekt = GetComponent <Obiekt>(); if (_obiekt != null) { _obiekt.Init_Delegates(null, null, null, null, Prawy_ClickDown, Prawy_ClickUp, null, null, null, null, CheckPrawyClickUp_EveryOtherObj, CheckPrawyClickUp_EveryOtherObj); } _zaznaczenie = GetComponent <Zaznaczenie>(); _zaznaczacz = _baza.gameObject.GetComponent <Zaznaczacz>();//GameObject.Find("Baza").GetComponent<Zaznaczacz>(); Init_Komunikat(); }
void Start() { Parent = GetComponent <Obiekt>(); if (Parent != null) { Parent.Init_Delegates(null, ClickDown, ClickUp, null, null, null, Hover, Leave, null, CoursorContactWithThis, CoursorContactWithOther, CoursorNoContact); } rMesh = gameObject.GetComponentInChildren <Renderer>(); if (Neutral != null) { rMesh.material.mainTexture = Neutral; } _bJuzPoszedl = true; _bKlikniety = _bZaznaczony = false; _zaznaczacz = GameObject.Find("Baza").GetComponent <Zaznaczacz>(); Init_Delegates(); }
private void Init_Obiekt() { _obiekt = GetComponent <Obiekt>(); _obiekt.Init_Delegates(null, null, null, null, null, null, Hover, Leave, null, null, null, null); }