public override void Excute() { if (form.TextureList.Items.Count > 0 && form.TextureList.SelectedItem != null) { LayerStateBeforeRecursion = new TileLayer(currentLayer.TileMapArray); foreach (Texture2D text in currentLayer.TexturesList) { LayerStateBeforeRecursion.AddTexture(text); } fillCounter = 5000; FillCellIndex((int)form.TileX, (int)form.TileY, currentLayer.HasTexture(form.dictTextures[form.TextureList.SelectedItem as string])); } }
public override void Excute() { TileLayer currentLayer = this.form.currentLayer; if (form.TextureList.Items.Count > 0 && form.TextureList.SelectedItem != null) { if ((this.form.TileX != null) || (this.form.TileY != null)) { int TileX = (int)this.form.TileX; int TileY = (int)this.form.TileY; this.TileLocation = new Vector2(TileX, TileY); this.layer = currentLayer; this.PreviousTexture = currentLayer.GetCellIndex(TileX, TileY); string TextureToSet = form.TextureList.SelectedItem.ToString(); Texture2D text = form.dictTextures[TextureToSet]; int IndexToSet = currentLayer.HasTexture(text); currentLayer.SetCellIndex(TileX, TileY, IndexToSet); } } }