Пример #1
0
 public void TriggerGridObjectChanged(int x, int y)
 {
     OnGridValueChanged?.Invoke(this, new OnGridValueChangedEventArgs()
     {
         X = x, Y = y
     });
 }
 public void SetGridObject(int x, int y, T value)
 {
     if (x >= 0 && y >= 0 && x < width && y < height)
     {
         gridArray[x, y] = value;
         OnGridValueChanged?.Invoke(this, new OnGridValueChangedEventArgs {
             x = x, y = y
         });
     }
 }
Пример #3
0
 public void SetGridObject(int x, int y, TGridObject value)
 {
     if (x >= 0 && y >= 0 && x < _width && y < _height)
     {
         _gridArray[x, y] = value;
         OnGridValueChanged?.Invoke(this, new OnGridValueChangedEventArgs()
         {
             X = x, Y = y
         });
     }
 }
Пример #4
0
 public void SetGridObject(int x, int y, T v)
 {
     if (IsValidXY(x, y))
     {
         gridArray[x, y]      = v;
         debugText[x, y].text = v.ToString();
     }
     OnGridValueChanged?.Invoke(this, new OnGridValueChangedArgs {
         x = x, y = y
     });
 }