示例#1
0
        protected void Awake()
        {
            inifloats();

            initLocation();

            return;


            void inifloats()
            {
                this.limit        = 1.0f;                      //
                this.volume       = 0.0f;                      //
                this.ParentZone   = this.GetComponentInParent <ZoneBase>();
                this.nodeRenderer = this.GetComponent <Renderer>();
                this.mpb          = new MaterialPropertyBlock();
                this.backLinks    = new List <LinkUnit>();
            }

            void initLocation()
            {
                this.position     = this.transform.position;
                this.linkerCenter = this.ParentZone.CalucNeuronForwardosition(this.position, this.ParentZone.UnitLinkArmDistance);
            }
        }
示例#2
0
 public override bool IsLinkTarget(ZoneBase other)
 {
     return
         (this.IsLinkableSelfZone && (ZoneBase)this == other
          ||
          this.ForwardZones.Any(zone => zone == other)
         );
 }
示例#3
0
文件: ZoneBase.cs 项目: abarabone/snn
 abstract public bool IsLinkTarget(ZoneBase other);