Skip to content

Commit 981cc0d

Browse files
authored
Merge pull request #33 from marosiak/docs-fix-events
docs: fix broken event methods
2 parents 0846d36 + 6092415 commit 981cc0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,18 +288,18 @@ Several events will automatically fire whenever an inventory is edited. This is
288288

289289
```C#
290290
// Subscribe to item added event
291-
inventory.Instance.ItemAdded.AddListener((item) => {
291+
inventory.Instance.Events.ItemAdded.AddListener((item) => {
292292
Debug.Log("Item added: " + item.Definition.DisplayName);
293293
});
294294

295295
// Subscribe to item removed event
296-
inventory.Instance.ItemRemoved.AddListener((item) => {
296+
inventory.Instance.Events.ItemRemoved.AddListener((item) => {
297297
Debug.Log("Item removed: " + item.Definition.DisplayName);
298298
});
299299

300300
// Subscribe to item quantity changed event
301301
// Note this will fire when an item is added or removed
302-
inventory.Instance.ItemChanged.AddListener((item) => {
302+
inventory.Instance.Events.ItemChanged.AddListener((item) => {
303303
Debug.Log("Item quantity changed: " + item.Definition.DisplayName);
304304
});
305305
```

0 commit comments

Comments
 (0)