Ejemplo n.º 1
0
 protected void NextGridElement()
 {
     if (_myAgent.Path.Count == 0)
     {
         _currentElement = null;
         return;
     }
     _currentElement = _myAgent.Path[0] as WaterGridElement;
     _myAgent.Path.RemoveAt(0);
 }
Ejemplo n.º 2
0
 protected void NextGridElement()
 {
     if (_myAgent.Path.Count == 0)
     {
         _currentElement = null;
         return;
     }
     if (_currentElement != null)
     {
         _currentElement.UsePoint(false, this);
     }
     _currentElement = _myAgent.Path[0] as WaterGridElement;
     _myAgent.Path.RemoveAt(0);
 }
Ejemplo n.º 3
0
 private void PathVisibility(bool flag = false)
 {
     if (_currentElement != null)
     {
         _currentElement.UsePoint(flag, this);
     }
     foreach (GridElement element in _myAgent.Path)
     {
         WaterGridElement waterElement = element as WaterGridElement;
         if (waterElement != null)
         {
             waterElement.UsePoint(flag, this);
         }
     }
 }