Exemplo n.º 1
0
 private void AddTileToEngine(CombinedMapData tile)
 {
     ShapeChangeEventArgs e = new ShapeChangeEventArgs(tile, ShapeChangeEventArgs.ChangeAction.Add);
     FireMapChangedEvent(e);
 }
Exemplo n.º 2
0
 private void RemoveTileFromEngine(CombinedMapData tile)
 {
     ShapeChangeEventArgs se = new ShapeChangeEventArgs(tile, ShapeChangeEventArgs.ChangeAction.Remove);
     FireMapChangedEvent(se);
 }
Exemplo n.º 3
0
 public void FireMapChangedEvent(ShapeChangeEventArgs e)
 {
     if (MapChanged != null) MapChanged(this, e);
 }
 private void FireMapUpdateCompletedEvent(ShapeChangeEventArgs e)
 {
     if (MapUpdateCompleted != null) MapUpdateCompleted(this, e);
 }
Exemplo n.º 5
0
 void s_ShapeUpdated(object sender, ShapeChangeEventArgs e)
 {
     RemoveShape(e.ChangedShape);
     AddShape(e.ChangedShape);
 }
Exemplo n.º 6
0
 private void FireShapeChangeEvent(ShapeChangeEventArgs e)
 {
     if (ShapeUpdated != null) ShapeUpdated(this, e);
 }
Exemplo n.º 7
0
 void earthTiles_MapChanged(object sender, ShapeChangeEventArgs e)
 {
     if (e.Action == ShapeChangeEventArgs.ChangeAction.Add)
     {
         if (!Engine.ShapeList.Contains(e.ChangedShape))
         {
             this.InsertShape(0, e.ChangedShape);
             SetGrid();
         }
     }
     if (e.Action == ShapeChangeEventArgs.ChangeAction.Remove)
     {
         this.RemoveShape(e.ChangedShape);
     }
 }