Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ben_singer committed Nov 17, 2024
1 parent 2f8f779 commit d24b3d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docfx/docs/items.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ Item bomb = new("Bomb", "A bomb", commands:

## Interaction

Interactions can be set up between different assets in the game. The **InteractionResult** contains the result of the interaction, and allows the game to react to the interaction.
Interactions can be set up between different assets in the game. The **Interaction** contains the result of the interaction, and allows the game to react to the interaction.

```csharp
var dartsBoard = new Item("Darts board", "A darts board.");

var dart = new Item("Dart", "A dart", interaction: item =>
{
if (item == dartsBoard)
return new InteractionResult(InteractionEffect.SelfContained, item, "The dart stuck in the darts board.");
return new Interaction(InteractionResult.NeitherItemOrTargetExpired, item, "The dart stuck in the darts board.");

return new InteractionResult(InteractionEffect.NoEffect, item);
return new Interaction(InteractionResult.NeitherItemOrTargetExpired, item);
});
```

0 comments on commit d24b3d7

Please sign in to comment.