Exemplo n.º 1
0
        /// <summary>
        /// Removes a wall from the specified tile.
        /// </summary>
        /// <param name="tile">The tile to remove a wall from.</param>
        /// <returns>True if a wall was successfully removed.</returns>
        public bool RemoveWall(Tile tile)
        {
            if (!CheckContainsWall(tile, out _))
            {
                return(false);
            }

            var wall = walls[tile];

            wall.Scene = null;
            wall.OnRemovedFromScene();
            walls.Remove(tile);

            WallRemoved?.Invoke(wall);

            return(true);
        }
Exemplo n.º 2
0
 private void OnWallRemoved(WallRemovedEventArgs e)
 {
     WallRemoved?.Invoke(SourceGrid, e);
 }