Beispiel #1
0
 private void RunLayerGlobalEvent(HashSet <int> cells, ScenePartitionerLayer layer, object event_data)
 {
     if (layer.OnEvent != null)
     {
         foreach (int cell in cells)
         {
             layer.OnEvent(cell, event_data);
         }
     }
 }
Beispiel #2
0
 private void RunLayerGlobalEvent(List <int> cells, ScenePartitionerLayer layer, object event_data)
 {
     if (layer.OnEvent != null)
     {
         for (int i = 0; i < cells.Count; i++)
         {
             layer.OnEvent(cells[i], event_data);
         }
     }
 }
Beispiel #3
0
 private void RunLayerGlobalEvent(int x, int y, int width, int height, ScenePartitionerLayer layer, object event_data)
 {
     if (layer.OnEvent != null)
     {
         for (int i = y; i < y + height; i++)
         {
             for (int j = x; j < x + width; j++)
             {
                 int num = Grid.XYToCell(j, i);
                 if (Grid.IsValidCell(num))
                 {
                     layer.OnEvent(num, event_data);
                 }
             }
         }
     }
 }