Пример #1
0
 protected virtual void OnTileTypeChanged(TileTypeChangedArgs e)
 {
     EventHandler<TileTypeChangedArgs> handler = TileTypeChanged;
     if (handler != null)
     {
         handler(this, e);
     }
 }
Пример #2
0
 public EmptyTile this[int x, int y]
 {
     get
     {
         if ((x <= Width | x >= 0) && (y <= Hight | y >= 0))
         {
             return tiles[x, y];
         }
         else
         {
             return null;
         }
            
     }
     set
     {
         TileTypeChangedArgs a = new TileTypeChangedArgs();
         a.x = x;
         a.y = y;
         tiles[x, y] = value;
         OnTileTypeChanged(a);
     }
 }
Пример #3
0
 void w_TileTypeChange(object sender, TileTypeChangedArgs e)
 {
     System.Random rnd = new System.Random();
     SetTileSprite(e.x, e.y, go_tiles[e.x, e.y], rnd);
 }