コード例 #1
0
    public void RefreshMemory()
    {
        //bool hasFinished = true;
        List <hotspot> allLanding = primeLanding.GetAllItems();

        nLandingSpots = allLanding.Count;
        foreach (var spot in allLanding)
        {
            List <hotspot> colliding;
            primeLanding.GetColliding(out colliding, new Bounds(spot.location, spot.heat * Vector3.one));
            if (colliding.Count > 1)
            {
                hotspot newSpot = new hotspot(colliding);
                primeLanding.Add(newSpot, new Bounds(newSpot.location, hotspot.GetBucketSize(minLandingSize, minMemoryDistance, oneMeterMemoryDistance, newSpot.location, _thisT.position) * Vector3.one));
                foreach (var item in colliding)
                {
                    primeLanding.Remove(item);
                }
                //hasFinished = false;
                break;
            }
        }
    }