コード例 #1
0
ファイル: CF_Edit.cs プロジェクト: Arassus/Janusz_02a
    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);
        }
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
    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";
                }
            }
        }
    }
コード例 #4
0
ファイル: Combo_Form.cs プロジェクト: Arassus/Janusz_02a
    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;
        }
    }
コード例 #5
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();
    }
コード例 #6
0
ファイル: Zaznaczenie.cs プロジェクト: Arassus/Janusz_02a
    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();
    }
コード例 #7
0
    private void Init_Obiekt()
    {
        _obiekt = GetComponent <Obiekt>();

        _obiekt.Init_Delegates(null, null, null, null, null, null, Hover, Leave, null, null, null, null);
    }