Example #1
0
        protected virtual void OnTileCleared(LocatedTileEventArgs e)
        {
            var ev = TileCleared;

            if (ev != null)
            {
                ev(this, e);
            }
        }
Example #2
0
        protected virtual void OnTileRemoving(LocatedTileEventArgs e)
        {
            var ev = TileRemoving;

            if (ev != null)
            {
                ev(this, e);
            }
        }
Example #3
0
        // NB: Consider changing event to give back the original TileStack
        public void ClearTile(int x, int y)
        {
            CheckBoundsFail(x, y);

            LocatedTileEventArgs ea = new LocatedTileEventArgs(null, x, y);

            OnTileClearing(ea);
            ClearTileImpl(x, y);
            OnTileCleared(ea);
        }
Example #4
0
        public void RemoveTile(int x, int y, Tile tile)
        {
            CheckBoundsFail(x, y);

            LocatedTileEventArgs ea = new LocatedTileEventArgs(tile, x, y);

            OnTileRemoving(ea);
            RemoveTileImpl(x, y, tile);
            OnTileRemoved(ea);
        }
Example #5
0
        public void AddTile(int x, int y, Tile tile)
        {
            CheckBoundsFail(x, y);
            CheckTileFail(tile);

            LocatedTileEventArgs ea = new LocatedTileEventArgs(tile, x, y);

            OnTileAdding(ea);
            AddTileImpl(x, y, tile);
            OnTileAdded(ea);
        }
Example #6
0
 private void TileRemovingHandler(object sender, LocatedTileEventArgs e)
 {
     _fillCommand.QueueRemove(new TileCoord(e.X, e.Y), e.Tile);
 }
Example #7
0
 private void TileAddingHandler(object sender, LocatedTileEventArgs e)
 {
     _drawCommand.QueueAdd(new TileCoord(e.X, e.Y), e.Tile);
 }
Example #8
0
 protected virtual void OnTileRemoving(LocatedTileEventArgs e)
 {
     var ev = TileRemoving;
     if (ev != null)
         ev(this, e);
 }
Example #9
0
 protected virtual void OnTileCleared(LocatedTileEventArgs e)
 {
     var ev = TileCleared;
     if (ev != null)
         ev(this, e);
 }
Example #10
0
        public void RemoveTile(int x, int y, Tile tile)
        {
            CheckBoundsFail(x, y);

            LocatedTileEventArgs ea = new LocatedTileEventArgs(tile, x, y);
            OnTileRemoving(ea);
            RemoveTileImpl(x, y, tile);
            OnTileRemoved(ea);
        }
Example #11
0
        // NB: Consider changing event to give back the original TileStack
        public void ClearTile(int x, int y)
        {
            CheckBoundsFail(x, y);

            LocatedTileEventArgs ea = new LocatedTileEventArgs(null, x, y);
            OnTileClearing(ea);
            ClearTileImpl(x, y);
            OnTileCleared(ea);
        }
Example #12
0
        public void AddTile(int x, int y, Tile tile)
        {
            CheckBoundsFail(x, y);
            CheckTileFail(tile);

            LocatedTileEventArgs ea = new LocatedTileEventArgs(tile, x, y);
            OnTileAdding(ea);
            AddTileImpl(x, y, tile);
            OnTileAdded(ea);
        }