Ejemplo n.º 1
0
 /// <summary>
 /// Logic for stopping the drawingLine when selecting a crowd.
 /// </summary>
 private void OnSelectionStopped(Vector3 mousePosition)
 {
     Ray ray = Camera.main.ScreenPointToRay(mousePosition);
     RaycastHit hit = new RaycastHit();
     if (Physics.Raycast(ray, out hit) && worldPosition1 != new Vector3())
     {
         //Create a criteria based on selected positons, and then create the event scheduler
         GroundRectangle rect = new GroundRectangle(worldPosition1, hit.point);
         SpatialAreaCriteria criteria = new SpatialAreaCriteria(rect);
         highlighter.HighlightAfterUnhighlight(SmartCrowdCriteria.AllSatisfyingCriteria(criteria));
         CreateEventScheduler(criteria);
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     rect = new GroundRectangle(GoToEdge1.position, GoToEdge2.position);
 }