예제 #1
0
 public void Setup()
 {
     QT       = new QuadTree(new Rectangle(0, 0, 100, 100));
     RQ       = new RadiusSearchQuery(50, QT, QT);
     occupant = new Occupant();
     DLA      = new MovementVector();
     VQ       = new VectorSearchQuery(QT, QT, occupant, DLA);
     Start    = new StartTreeSearch();
 }
예제 #2
0
        public void UpdateLights()
        {
            Coords          OccupantWfiPosition = new Coords(_init.occupant.WiFiPosition1.x, _init.occupant.WiFiPosition1.y);
            Query           radiusQuery         = new RadiusSearchQuery(100, _init.Tree, _init.Tree);
            Query           vectorQuery         = new VectorSearchQuery(_init.Tree, _init.Tree, _init.occupant, _init.ActivateLights);
            StartTreeSearch startSearch         = new StartTreeSearch();

            _init.NyList = startSearch.SearchQuery(OccupantWfiPosition, radiusQuery, vectorQuery);

            _init.ActivateLights.FindUnitsToActivate(_init.NyList, _init.occupant);
            _init.Controller.IncrementAllLights();
        }