Example #1
0
    // Use this for initialization
    void Start()
    {
        Selektor selektor = Selektor.getInstance();

        Transform olap_kocka;
        Vector3   position = new Vector3();
        Vector3   scale    = new Vector3();

        using (DataTable entiteti = selektor.getEntites()) {
            foreach (DataRow e in entiteti.Rows)
            {
                //postavljanje pozicije
                position.x = float.Parse(e ["PositionX"].ToString());                  //358.18F;
                position.y = float.Parse(e ["PositionY"].ToString());                  //0.67F;
                position.z = float.Parse(e ["PositionZ"].ToString());                  //237.87F;
                //postavljanje veličine
                scale.x = float.Parse(e ["ScaleX"].ToString());
                scale.y = float.Parse(e ["ScaleY"].ToString());
                scale.z = float.Parse(e ["ScaleZ"].ToString());

                olap_kocka      = Instantiate(prefab, position, Quaternion.identity);
                olap_kocka.name = e ["Naziv"].ToString();
                //postavljanje rotacije
                olap_kocka.transform.Rotate(float.Parse(e ["RotationX"].ToString()),
                                            float.Parse(e ["RotationY"].ToString()),
                                            float.Parse(e ["RotationZ"].ToString()));
                olap_kocka.transform.localScale += scale;
                olap_kocka.GetComponent <Entity> ().EntitetID = e ["EntitetiID"].ToString();
                olap_kocka.GetComponent <Entity> ().sifra     = e ["Sifra"].ToString();
                olap_kocka.GetComponent <Entity> ().opis      = e ["Opis"].ToString();
            }
        }
    }
Example #2
0
    private void DeleteNeiron()      //Кнопка Delete Neiron!!
    {
        if (Selektor.GetComponent <NeironScript>().Area != null)
        {
            Selektor.GetComponent <NeironScript>().Area.GetComponent <AreaScript>().amount--;
        }
        GameObject SS = Selektor;

        Selektor = null;
        GameObject[] OjectNeiron = GameObject.FindGameObjectsWithTag("Neiron");

        foreach (GameObject value in OjectNeiron)
        {
            foreach (GameObject val in value.GetComponent <NeironScript>().hitSinaps)
            {
                if (val.GetComponent <SinapsScript>().NeironTarget == SS)
                {
                    value.GetComponent <NeironScript>().hitSinaps.Remove(val);
                    Destroy(val);
                    break;
                }
            }
        }

        Destroy(SS);
    }
Example #3
0
    private void setEntiteti()
    {
        //dohvaćanje trenutnog ID prostora
        query = "select *from Entiteti where ProstoriID=" + prostorID + ";";
        DatabaseConnection database = DatabaseConnection.getInstance();
        DataTable          data     = database.Query(query);
        Selektor           selektor = Selektor.getInstance();

        selektor.setEntity(data);
    }
Example #4
0
 public static Selektor getInstance()
 {
     lock (myLockObject) {
         if (selektor == null)
         {
             selektor = new Selektor();
         }
     }
     return(selektor);
 }
Example #5
0
    private void setAtributi()
    {
        //dohvaćanje trenutnog ID prostora
        query = "select EntietiID, Vrijednost, Naziv from Atributi,AtributiEntiteta " +
                "where AtributiEntiteta.AtributiID = Atributi.AtributiID and Atributi.ProstoriID = " + prostorID + ";";
        DatabaseConnection database = DatabaseConnection.getInstance();
        DataTable          data     = database.Query(query);
        Selektor           selektor = Selektor.getInstance();

        selektor.setAtributi(data);
    }
Example #6
0
    void getEntites()
    {
        Selektor selektor = Selektor.getInstance();
        string   query    = buildQuery();

        Debug.Log(query);
        foreach (DataRow e in selektor.getAtributi().Select(query))
        {
            Debug.Log(e["EntietiID"].ToString());
        }
    }
Example #7
0
 private void SelektNeironOff(GameObject ObjectSelekt)       //При снятии с выбора нейрона
 {
     foreach (GameObject value in ObjectSelekt.GetComponent <NeironScript>().hitSinaps)
     {
         value.GetComponent <LineRenderer>().SetColors(new Color32(221, 221, 221, 109), new Color32(221, 221, 221, 109));
         value.GetComponent <SinapsScript>().NeironTarget.tag = "Neiron";
         value.GetComponent <LineRenderer>().SetWidth(0.2f, 0.2f);
     }
     Selektor.GetComponent <LineRenderer> ().enabled = false;
     SelP.SetActive(false);
     AddSinapsBool = false;
 }
        public async Task <ActionResult <Selektor> > GetSelektor(int id)
        {
            Selektor model = await _context.Selektori
                             .FirstOrDefaultAsync(i => i.id == id);

            if (model == null)
            {
                return(NotFound());
            }

            return(model);
        }
Example #9
0
    public void atributesOfEntityMenuData(string id)
    {
        List <string> atributi = new List <string> ();
        Selektor      selektor = Selektor.getInstance();

        id = "1";
        dropdown.ClearOptions();
        foreach (DataRow a in selektor.getAtributi().Select("EntietiID>" + id))
        {
            atributi.Add(a["Naziv"].ToString() + ": \t" + a ["Vrijednost"].ToString());
        }
        dropdown.AddOptions(atributi);
    }
        public async Task <ActionResult <Selektor> > DeletSelektor(int id)
        {
            Selektor model = await _context.Selektori
                             .FirstOrDefaultAsync(i => i.id == id);

            if (model == null)
            {
                return(NotFound());
            }

            _context.Entry(model).State = EntityState.Deleted;
            await _context.SaveChangesAsync();

            return(Ok());
        }
Example #11
0
 private void SinapsEditFind(GameObject SinapsTarget)
 {
     if (Selektor != null)
     {
         foreach (GameObject value in Selektor.GetComponent <NeironScript>().hitSinaps)
         {
             if (value.GetComponent <SinapsScript>().NeironTarget == SinapsTarget)
             {
                 SinapsEdit    = value;
                 StringWindows = "" + SinapsEdit.GetComponent <SinapsScript>().Force;
                 WindowS       = true;
                 break;
             }
         }
     }
 }
Example #12
0
    private void SelektNeironOn(GameObject ObjectSelekt)            // При выборе нейрона
    {
        Selektor.GetComponent <LineRenderer> ().enabled     = true; //Влючить демонстрацию вектора пути
        gameObject.GetComponent <ManagerArea>().BlokVisible = false;

        selGridInt = Selektor.GetComponent <NeironScript>().TypeIndexNeiron;
        SelP.SetActive(true);
        SelP.transform.position = Selektor.transform.position;

        foreach (GameObject value in ObjectSelekt.GetComponent <NeironScript>().hitSinaps)         //Все связанные нейронам установить
        {
            value.GetComponent <SinapsScript>().NeironTarget.tag = "SelectSinaps";
        }

        MaxAdderString = Selektor.GetComponent <NeironScript>().MaxAdder.ToString();

        DampferAdderString = Selektor.GetComponent <NeironScript>().DampferAdder.ToString();
        thresholdTopString = Selektor.GetComponent <NeironScript>().thresholdTop.ToString();
        AnswerTimeString   = Selektor.GetComponent <NeironScript>().AnswerTime.ToString();
        TimeReposeString   = Selektor.GetComponent <NeironScript>().TimeRepose.ToString();

        thresholdDownString         = Selektor.GetComponent <NeironScript>().thresholdDown.ToString();
        timeIgnoreString            = Selektor.GetComponent <NeironScript>().timeIgnore.ToString();
        DempferBonusThresholdString = Selektor.GetComponent <NeironScript>().DempferBonusThreshold.ToString();
        TimeEvaluationString        = Selektor.GetComponent <NeironScript>().TimeEvaluation.ToString();
        LimitRecurrenceString       = Selektor.GetComponent <NeironScript>().LimitRecurrence.ToString();
        thresholdTopUpString        = Selektor.GetComponent <NeironScript>().thresholdTopUp.ToString();

        AdaptationTimeString = Selektor.GetComponent <NeironScript>().AdaptationTime.ToString();
        thresholdAdaptString = Selektor.GetComponent <NeironScript>().thresholdAdapt.ToString();



        MaxForceSinapsString = Selektor.GetComponent <NeironScript>().MaxForceSinaps.ToString();
        TimeChargeString     = Selektor.GetComponent <NeironScript>().TimeCharge.ToString();
        FocusNeironString    = Selektor.GetComponent <NeironScript>().FocusNeiron.ToString();
        MaxFocusNeironString = Selektor.GetComponent <NeironScript>().MaxFocus.ToString();
        StepFocusString      = Selektor.GetComponent <NeironScript>().StepFocus.ToString();

        PlasticityString      = Selektor.GetComponent <NeironScript>().Plasticity.ToString();
        BasicPlasticityString = Selektor.GetComponent <NeironScript>().BasicPlasticity.ToString();
        StepPlasticityString  = Selektor.GetComponent <NeironScript>().StepPlasticity.ToString();

        FocusDinamicSetting      = Selektor.GetComponent <NeironScript>().FocusDinamic;
        PlasticityDinamicSetting = Selektor.GetComponent <NeironScript>().PlasticityDinamic;
        NewNeironDinamicSetting  = Selektor.GetComponent <NeironScript>().NewNeironDinamic;
    }
        public async Task <ActionResult <Selektor> > AddSelektor(Selektor model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (ValidateModel(model, true))
            {
                _context.Selektori.Add(model);
                await _context.SaveChangesAsync();

                return(CreatedAtAction("GetSelektor", new { id = model.id }, model));
            }
            else
            {
                return(BadRequest());
            }
        }
Example #14
0
    private void AddSinaps(GameObject targetS)
    {
        bool Conten = false;

        foreach (GameObject value in Selektor.GetComponent <NeironScript> ().hitSinaps)
        {
            if (value.GetComponent <SinapsScript>().NeironTarget == targetS)
            {
                Conten = true;
            }
        }
        if (!Conten)
        {
            GameObject cSinaps = Instantiate(prefabSinaps, Selektor.transform.position, transform.rotation) as GameObject;
            cSinaps.GetComponent <SinapsScript> ().NeironTarget = targetS;
            cSinaps.GetComponent <SinapsScript> ().Force        = 0.0f;
            cSinaps.transform.parent = Selektor.transform;
            Selektor.GetComponent <NeironScript> ().hitSinaps.Add(cSinaps);
            AddSinapsBool = false;
        }
    }
        public async Task <IActionResult> UpdateSelektor(Selektor model)
        {
            _context.Entry(model).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ModelExists(model.id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(Ok());
        }
 private bool ValidateModel(Selektor model, bool isPost)
 {
     return(true);
 }
Example #17
0
    void OnGUI()
    {
        //...............................................................................................................................
        if (!AddNeironBool)
        {
            if (GUI.Button(new Rect(210, 10, 80, 20), "Edit"))
            {
                AddNeironBool = true;
                GizmaNeiron.transform.position = CamTarget.position;
                GizmaNeiron.SetActive(true);
            }
        }
        else
        {
            if (GUI.Button(new Rect(210, 10, 80, 20), "Add neuron"))
            {
                Collider[] hitColliders = Physics.OverlapSphere(GizmaNeiron.transform.position, 1f);
                bool       ExistNeiron  = false;
                foreach (Collider coll in hitColliders)
                {
                    if (coll.tag == "Neiron")
                    {
                        ExistNeiron = true;
                        break;
                    }
                }
                if (!ExistNeiron)
                {
                    NewNeironVoid();
                    AddNeironBool = false;
                    GizmaNeiron.SetActive(false);
                }
            }
            if (GUI.Button(new Rect(291, 10, 50, 20), "END"))
            {
                AddNeironBool = false;
                GizmaNeiron.SetActive(false);
            }
            selNewGrid = GUI.SelectionGrid(new Rect(210, 31, 130, 20), selNewGrid, selStrings, selStrings.Length);
        }
        //..................................................................................................................................



        if (Selektor != null)
        {
            GUI.Label(new Rect(200, 130, 200, 20), "Charge: " + Selektor.GetComponent <NeironScript>().Charge.ToString());

            foreach (GameObject value in Selektor.GetComponent <NeironScript>().hitSinaps)
            {
                GameObject valueLevel     = value.GetComponent <SinapsScript>().NeironTarget;
                Vector3    screenPosition = Camera.main.WorldToScreenPoint(valueLevel.transform.position);
                Vector3    cameraRelative = Camera.main.transform.InverseTransformPoint(valueLevel.transform.position);
                if (cameraRelative.z > 0)
                {
                    Rect position = new Rect(screenPosition.x + 10f, Screen.height - screenPosition.y - 23f, 100f, 20f);
                    GUI.Label(position, "" + value.GetComponent <SinapsScript>().Force.ToString("0.0"));
                }
            }


            GUI.Label(new Rect(5, 5, 180, 20), "Index neuron: " + Selektor.GetComponent <NeironScript>().IndexNeiron);
            selGridInt = GUI.SelectionGrid(new Rect(5, 30, 180, 20), selGridInt, selStrings, selStrings.Length);
            if (selGridInt != Selektor.GetComponent <NeironScript>().TypeIndexNeiron)
            {
                Selektor.GetComponent <NeironScript>().TypeIndexNeiron = selGridInt;
            }

            if (!AddSinapsBool)
            {
                if (GUI.Button(new Rect(5, 55, 180, 20), "Add synapse"))
                {
                    AddSinapsBool = true;
                }
            }
            else
            {
                GUI.Label(new Rect(5, 55, 250, 20), "Select neuron on target synapse..");
            }

            if (Selektor.GetComponent <NeironScript>().Area != null)
            {
                string AreaButton = "";
                if (Selektor.GetComponent <NeironScript>().Area.GetComponent <AreaScript>().Global)
                {
                    AreaButton = "Clear Global Area";
                }
                else
                {
                    AreaButton = "Clear Area";
                    GUI.Label(new Rect(5, 105, 180, 20), "" + Selektor.GetComponent <NeironScript>().Area.GetComponent <AreaScript>().Name);
                }
                if (GUI.Button(new Rect(5, 80, 180, 20), AreaButton))
                {
                    Selektor.GetComponent <NeironScript>().Area.GetComponent <AreaScript>().amount--;
                    Selektor.GetComponent <NeironScript>().Area = null;
                }
            }
            else
            {
                if (GUI.Button(new Rect(5, 80, 180, 20), "Add Global Area"))
                {
                    Selektor.GetComponent <NeironScript>().Area = GlobalArea;
                    GlobalArea.GetComponent <AreaScript>().amount++;
                }
                if (GUI.Button(new Rect(5, 105, 180, 20), "Add Included Area"))
                {
                    foreach (GameObject AreaBouns in gameObject.GetComponent <ManagerArea>().hitArea)
                    {
                        if (AreaBouns.GetComponent <Collider>().bounds.Contains(Selektor.transform.position))
                        {
                            Selektor.GetComponent <NeironScript>().Area = AreaBouns;
                            AreaBouns.GetComponent <AreaScript>().amount++;
                            break;
                        }
                        if (Selektor.GetComponent <NeironScript>().Area == null)
                        {
                            Selektor.GetComponent <NeironScript>().Area = GlobalArea;
                        }
                    }
                }
            }

            GUILayout.BeginArea(new Rect(5, 130, 180, Screen.height - 160), GUI.skin.box);
            _inventoryScroll = GUILayout.BeginScrollView(_inventoryScroll, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true));

            GUILayout.Label("Adder:  " + Selektor.GetComponent <NeironScript>().Adder);
            GUILayout.Label("Max adder: ");
            MaxAdderString = GUILayout.TextField(MaxAdderString);
            GUILayout.Label("Damper: ");
            DampferAdderString = GUILayout.TextField(DampferAdderString);
            GUILayout.Label("Upper threshold:");
            thresholdTopString = GUILayout.TextField(thresholdTopString);
            GUILayout.Label("Response time: ");
            AnswerTimeString = GUILayout.TextField(AnswerTimeString);
            GUILayout.Label("Time relax: ");
            TimeReposeString = GUILayout.TextField(TimeReposeString);

            if (Selektor.GetComponent <NeironScript>().TypeIndexNeiron > 0)
            {
                GUILayout.Label("____________________");
                GUILayout.Label("t.Top + t.Bonus (t.Bonus)");
                float t = Selektor.GetComponent <NeironScript>().thresholdTop + Selektor.GetComponent <NeironScript>().bonusThreshold;
                GUILayout.Label(" " + t + "  (" + Selektor.GetComponent <NeironScript>().bonusThreshold + ")");
                GUILayout.Label("Lower threshold");
                thresholdDownString = GUILayout.TextField(thresholdDownString);
                GUILayout.Label("Negative time");
                timeIgnoreString = GUILayout.TextField(timeIgnoreString);
                GUILayout.Label("Damper threshold");
                DempferBonusThresholdString = GUILayout.TextField(DempferBonusThresholdString);
                GUILayout.Label("Valuation time");
                TimeEvaluationString = GUILayout.TextField(TimeEvaluationString);
                GUILayout.Label("Limit repeats");
                LimitRecurrenceString = GUILayout.TextField(LimitRecurrenceString);
                GUILayout.Label("Increasing threshold");
                thresholdTopUpString = GUILayout.TextField(thresholdTopUpString);
                GUILayout.Label("Adaptation time");
                AdaptationTimeString = GUILayout.TextField(AdaptationTimeString);
                GUILayout.Label("Basic threshold");
                thresholdAdaptString = GUILayout.TextField(thresholdAdaptString);
            }

            if (Selektor.GetComponent <NeironScript>().TypeIndexNeiron == 2)
            {
                GUILayout.Label("____________________");
                GUILayout.Label("Max force synapse:");
                MaxForceSinapsString = GUILayout.TextField(MaxForceSinapsString);
                GUILayout.Label("Speed:");
                TimeChargeString    = GUILayout.TextField(TimeChargeString);
                FocusDinamicSetting = GUILayout.Toggle(FocusDinamicSetting, "Focus Dynamics");
                if (FocusDinamicSetting)
                {
                    GUILayout.Label("Focus: " + Selektor.GetComponent <NeironScript>().FocusNeiron.ToString());
                    GUILayout.Label("Max focus: ");
                    MaxFocusNeironString = GUILayout.TextField(MaxFocusNeironString);
                    GUILayout.Label("Focus step:");
                    StepFocusString = GUILayout.TextField(StepFocusString);
                }
                else
                {
                    GUILayout.Label("Focus:");
                    FocusNeironString = GUILayout.TextField(FocusNeironString);
                }

                PlasticityDinamicSetting = GUILayout.Toggle(PlasticityDinamicSetting, "Plastic Dynamics");
                if (PlasticityDinamicSetting)
                {
                    GUILayout.Label("Plastic: " + Selektor.GetComponent <NeironScript>().Plasticity.ToString());
                    GUILayout.Label("Basic Plastic:");
                    BasicPlasticityString = GUILayout.TextField(BasicPlasticityString);
                    GUILayout.Label("Plastic step:");
                    StepPlasticityString = GUILayout.TextField(StepPlasticityString);
                }
                else
                {
                    GUILayout.Label("Plastic:");
                    PlasticityString = GUILayout.TextField(PlasticityString);
                    GUILayout.Label("Basic Plastic:");
                    BasicPlasticityString = GUILayout.TextField(BasicPlasticityString);
                }

                NewNeironDinamicSetting = GUILayout.Toggle(NewNeironDinamicSetting, "Dynamic net");
            }

            GUILayout.EndScrollView();
            GUILayout.EndArea();

            if (GUI.Button(new Rect(150, Screen.height - 25, 30, 20), "OK"))
            {
                Selektor.GetComponent <NeironScript>().MaxAdder = float.Parse(MaxAdderString);

                Selektor.GetComponent <NeironScript>().DampferAdder = float.Parse(DampferAdderString);
                Selektor.GetComponent <NeironScript>().thresholdTop = float.Parse(thresholdTopString);
                Selektor.GetComponent <NeironScript>().AnswerTime   = float.Parse(AnswerTimeString);
                Selektor.GetComponent <NeironScript>().TimeRepose   = float.Parse(TimeReposeString);

                Selektor.GetComponent <NeironScript>().thresholdDown         = float.Parse(thresholdDownString);
                Selektor.GetComponent <NeironScript>().timeIgnore            = float.Parse(timeIgnoreString);
                Selektor.GetComponent <NeironScript>().DempferBonusThreshold = float.Parse(DempferBonusThresholdString);
                Selektor.GetComponent <NeironScript>().TimeEvaluation        = float.Parse(TimeEvaluationString);
                Selektor.GetComponent <NeironScript>().LimitRecurrence       = int.Parse(LimitRecurrenceString);
                Selektor.GetComponent <NeironScript>().thresholdTopUp        = float.Parse(thresholdTopUpString);

                Selektor.GetComponent <NeironScript>().AdaptationTime = float.Parse(AdaptationTimeString);
                Selektor.GetComponent <NeironScript>().thresholdAdapt = float.Parse(thresholdAdaptString);

                Selektor.GetComponent <NeironScript>().MaxForceSinaps = float.Parse(MaxForceSinapsString);
                Selektor.GetComponent <NeironScript>().TimeCharge     = float.Parse(TimeChargeString);
                Selektor.GetComponent <NeironScript>().FocusNeiron    = float.Parse(FocusNeironString);
                Selektor.GetComponent <NeironScript>().MaxFocus       = float.Parse(MaxFocusNeironString);
                Selektor.GetComponent <NeironScript>().StepFocus      = float.Parse(StepFocusString);

                Selektor.GetComponent <NeironScript>().Plasticity      = float.Parse(PlasticityString);
                Selektor.GetComponent <NeironScript>().BasicPlasticity = float.Parse(BasicPlasticityString);
                Selektor.GetComponent <NeironScript>().StepPlasticity  = float.Parse(StepPlasticityString);

                Selektor.GetComponent <NeironScript>().FocusDinamic      = FocusDinamicSetting;
                Selektor.GetComponent <NeironScript>().PlasticityDinamic = PlasticityDinamicSetting;
                Selektor.GetComponent <NeironScript>().NewNeironDinamic  = NewNeironDinamicSetting;
            }

            if (GUI.Button(new Rect(5, Screen.height - 25, 100, 20), "Delete neuron"))
            {
                DeleteNeiron();
            }
        }

        if (WindowS)
        {
            WindowsRect = GUI.Window(0, WindowsRect, DoMyWindow, "");
        }
    }
Example #18
0
    void Update()
    {
        int YY = 0;

        if (gameObject.GetComponent <ManagerArea>().BlokVisible)
        {
            YY = 225;
        }
        else
        {
            YY = 25;
        }
        if (Input.GetKeyDown(KeyCode.Mouse0) && (!WindowS))
        {
            if (((Selektor == null) && (Input.mousePosition.y > YY)) || ((Input.mousePosition.x > 200) && (Selektor != null) && (Input.mousePosition.y > YY)))
            {
                Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit;
                if (Physics.Raycast(ray, out hit, 1000.0F))
                {
                    if (hit.collider.tag == "Neiron")
                    {
                        if (!SelectLetterOut)
                        {
                            if (!AddSinapsBool)
                            {
                                Selektor = hit.collider.gameObject;
                            }
                            else
                            {
                                if (hit.collider.gameObject != Selektor)
                                {
                                    AddSinaps(hit.collider.gameObject);
                                }
                            }
                        }
                        else
                        {
                            SelektorLetterOut.SendMessage("ApplyTarget", hit.collider.gameObject);
                            SelektorLetterOut.SendMessage("Start");
                            SelektorLetterOut = null;
                        }
                    }

                    if (hit.collider.tag == "SelectSinaps")
                    {
                        SinapsEditFind(hit.collider.gameObject);
                        WindowsRect  = new Rect(Input.mousePosition.x + 5f, Screen.height - Input.mousePosition.y - 25f, 205, 55);                               //Размеры окна
                        selSinapsInt = SinapsEdit.GetComponent <SinapsScript>().TypeSinaps;
                    }

                    if (hit.collider.tag == "LetterOut")
                    {
                        SelektorLetterOut = hit.collider.gameObject;
                    }
                    if (hit.collider.tag == "EyeEdit")
                    {
                        SelektorLetterOut = hit.collider.gameObject;
                    }
                }

                else
                {
                    Selektor          = null;
                    SelektorLetterOut = null;
                    EyeObject.GetComponent <EyeF1>().SelectReceptor = null;
                }
            }
        }

        if (Selektor != null)
        {
            foreach (GameObject value in Selektor.GetComponent <NeironScript>().hitSinaps)
            {
                if (value.GetComponent <SinapsScript>().TypeSinaps == 0)
                {
                    value.GetComponent <LineRenderer>().SetColors(new Color32(255, 255, 0, 109), new Color32(255, 255, 0, 109));
                }
                if (value.GetComponent <SinapsScript>().TypeSinaps == 1)
                {
                    value.GetComponent <LineRenderer>().SetColors(new Color32(0, 255, 255, 109), new Color32(0, 255, 255, 109));
                }
                if (value.GetComponent <SinapsScript>().TypeSinaps == 2)
                {
                    value.GetComponent <LineRenderer>().SetColors(new Color32(255, 0, 255, 109), new Color32(255, 0, 255, 109));
                }
                value.GetComponent <LineRenderer>().SetWidth(0.3f, 0.4f);                //Толщина синапса
            }
        }
    }
        public async Task <IActionResult> Check(IdChecker idChecker)
        {
            if (idChecker.type == 1)
            {
                ClanOrgOdb model = await _context.ClanOrgOdbora
                                   .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 2)
            {
                Festival model = await _context.Festivali
                                 .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 3)
            {
                Forma model = await _context.Forme
                              .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 4)
            {
                Glumac model = await _context.Glumci
                               .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 5)
            {
                Nagrada model = await _context.Nagrade
                                .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 6)
            {
                OrgOdb model = await _context.OrgOdbori
                               .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 7)
            {
                Pozoriste model = await _context.Pozorista
                                  .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 8)
            {
                Predstava model = await _context.Predstave
                                  .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 9)
            {
                PropDeoFest model = await _context.PropDeoFesta
                                    .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 10)
            {
                Radnik model = await _context.Radnici
                               .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 11)
            {
                Reditelj model = await _context.Reditelji
                                 .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 12)
            {
                Sala model = await _context.Sale
                             .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 13)
            {
                Selektor model = await _context.Selektori
                                 .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            if (idChecker.type == 14)
            {
                Ugovor model = await _context.Ugovori
                               .FirstOrDefaultAsync(i => i.id == idChecker.idChecker);

                if (model == null)
                {
                    return(Ok());
                }
            }

            return(BadRequest());
        }