protected override void BTAwake() { base.BTAwake(); var computes = GetComponents <IBTGet <T> >(); foreach (var compute in computes) { if (compute.ID == GetIdA) { GetA = compute; GetA.Root = Root; continue; } if (compute.ID == GetIdB) { GetB = compute; GetB.Root = Root; } } if (GetA == null || ReadGetCount == 2 && GetB == null) { throw new Exception("Compute 不能为null" + transform.GetFullName()); } }
protected override void BTAwake() { base.BTAwake(); var computes = GetComponents <IBTGet <float> >(); foreach (var compute in computes) { if (compute.ID == GetIdA) { GetA = compute; GetA.Root = Root; break; } } if (ReadGetCount == 1 && GetA == null) { throw new Exception("Compute 不能为null"); } }
protected override void BTAwake() { base.BTAwake(); var gets = GetComponents <IBTGet <T> >(); foreach (var compute in gets) { if (compute.ID == GetIdA) { GetA = compute; GetA.Root = Root; break; } } if (ReadGetCount == 1 && GetA == null) { throw new Exception("Compute 不能为null" + transform.GetFullName()); } }