Exemple #1
0
    public override void OnArround(bool b)
    {
        try
        {
            Around.SetActive(b);

            if (b == true)
            {
                pinruncollect = null;
                this.tag      = "BreadPin";
                if (this.tag == "BreadPlus")
                {
                    group.SetVcc(false);
                }
                else if (this.tag == "BreadGND")
                {
                    group.SetGND(false);
                }
                else if (this.tag == "BreadDIGITAL")
                {
                    group.SetDigital(false);
                }
            }
        }
        catch (Exception)
        {
            Func(delegate() { return(true); });
        }
    }
Exemple #2
0
    private IEnumerator Work(Collider other)
    {
        if (other.tag == "Line")
        {
            OnArround(false);
            Line = other.gameObject.GetComponentInParent <LineManager>();



            if (Line.parent != null)
            {
                if (Line.parent.tag == "VCC" || Line.parent.tag == "BreadPlus")
                {
                    if (this.tag != "BreadGND" && this.tag != "BreadDIGITAL")
                    {
                        group.tag = "BreadPlus";
                        this.tag  = "BreadPlus";

                        group.SetVcc(true);
                    }
                }
                else if (Line.parent.tag == "GND" || Line.parent.tag == "BreadGND")
                {
                    if (this.tag != "BreadPlus" && this.tag != "BreadDIGITAL")
                    {
                        group.tag = "BreadGND";
                        this.tag  = "BreadGND";

                        group.SetGND(true);
                    }
                }
                else if (Line.parent.tag == "DIGITAL" || Line.parent.tag == "BreadDIGITAL")
                {
                    if (this.tag != "BreadPlus" && this.tag != "BreadGND")
                    {
                        group.tag = "BreadDIGITAL";
                        this.tag  = "BreadDIGITAL";
                        group.SetDigital(true);
                    }
                }


                if (Line.parent.tag != "VCC" && Line.parent.tag != "GND" && Line.parent.tag != "DIGITAL")
                {
                    pinruncollect   = new RunCollect(Line.RunCollect);
                    pinpausecollect = new PauseCollect(Line.PauseCollect);
                }
            }
        }



        yield return(new WaitForSeconds(1));
    }