public void Init(BoxManager boxes, SensableObjects objs) { this.boxes = boxes; this.allObjects = objs; //allObjects.RegisterObject(new SensableObject(gameObject, classification)); //if(behaviour) { // StartCoroutine(RunStateMachine()); //} }
public Separation(SensableObjects allObjects) : base(allObjects) { }
public void Update() { if (allObjects == null) { allObjects = GetComponent<Brain> ().allObjects; if (allObjects == null) { return; } } foreach (SensableObject obj in allObjects.GetObjectsInRadius(transform.position, maxViewDistance)) { if (!aggregates.ContainsKey (obj)) { aggregates.Add (obj, new RaycastAggregate (transform, obj.obj.GetComponentInChildren<MeshFilter> (), visibleLayers)); } if (Vector3.Angle (obj.obj.transform.position - transform.position, transform.forward) < peripheralFOV) { aggregates [obj].QueueRaycast (); } } }
void Awake() { aggregates = new Dictionary<SensableObject, RaycastAggregate> (); allObjects = GetComponent<Brain> ().allObjects; }
public Alignment(SensableObjects allObjects) : base(allObjects) { }
public GroupMemberSteeringBehaviour(SensableObjects allObjects) { groupMembers = allObjects; }
public Cohesion(SensableObjects allObjects) : base(allObjects) { }