public override void Execute(TileManager tileManager, Tile tile, TilePosition pos) { pos += delta; if (tileManager.IsValidTile(pos)) tileManager.EnqueueInvalidatedTile(pos); }
public override void Execute(TileManager tileManager, Tile tile, TilePosition pos) { int level = tile.ExtraData; if (tileManager.Ticks % spreadSpeed == 0) { //Update this tile level if (level != 0) level = UpdateTileLevel(tileManager, tile, pos, level); //Propagate if (level <= maxLevel) Propagate(tileManager, tile, pos, level); else if (level > maxLevel) tileManager.SetTileType(pos, TileDefinition.EMPTY_TILE_TYPE); } else { tileManager.EnqueueInvalidatedTile(pos); } }