Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
benpollarduk authored Nov 27, 2024
1 parent cc974fe commit db1301e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ The [NetAF.Imaging](https://github.com/benpollarduk/NetAF.Imaging) extension pac

![image](https://github.com/user-attachments/assets/68714a47-21c6-4661-ba8f-cd089750f8ed)

This only requires a few simple steps. Here is a simple room that contains a command to look at the view. The *GridVisualBuilderHelper* from [NetAF.Imaging](https://github.com/benpollarduk/NetAF.Imaging) takes care of generating the visual.
This only requires a few simple steps. Here is a simple room that contains a command to look at the view. The *VisualHelper* from [NetAF.Imaging](https://github.com/benpollarduk/NetAF.Imaging) takes care of generating the visual.
```csharp
return new Room("Hillside", "A wild hillside with a lone tree", commands:
[
new CustomCommand(new CommandHelp("Look at view", "Look at the current view."), true, true, (game, args) =>
{
var frame = new GridVisualFrame(GridVisualBuilderHelper.FromImage(imagePath, game.Configuration.DisplaySize, new CellSize(8, 12)));
var frame = new GridVisualFrame(VisualHelper.FromImage(imagePath, game.Configuration.DisplaySize, new CellSize(8, 12)));
game.ChangeMode(new VisualMode(frame));
return new(ReactionResult.GameModeChanged, string.Empty);
})
Expand Down

0 comments on commit db1301e

Please sign in to comment.