public void CheckNeighbors() { name = "HeatmapObject @ " + Time.time; foreach (Collider other in Physics.OverlapSphere(transform.position, combineRadius)) { HeatmapObject hmo = other.GetComponent <HeatmapObject>(); if (hmo && hmo.owner != this.owner) { HeatmapObject.collisionPairs.Add(new HeatmapCollisionPair(this, hmo)); // Debug.Log("add:"+hmo); } else { } } HeatmapObject.ResolveCollisions(); }
public HeatmapCollisionPair(HeatmapObject _a, HeatmapObject _b) { a = _a; b = _b; }