Skip to content
This repository was archived by the owner on Aug 10, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Game events are scriptable objects (_Right Click -> Create -> Game Events -> ...
Available game events:
- `GameEvent` - simple event which doesn't accept any arguments.
- `BoolGameEvent` - event with a `bool` argument.
- `IntGameEvent` - event with a `int` argument.
- `IntGameEvent` - event with an `int` argument.
- `FloatGameEvent` - event with a `float` argument.
- `StringGameEvent` - event with a `string` argument.
- `Vector2GameEvent` - event with a `Vector2` argument.
Expand All @@ -58,7 +58,7 @@ Mutable objects are used for storing and editing data on `ScriptableObject` asse

Available mutable objects:
- `MutableBool` - encapsulates a `bool` value.
- `MutableInt` - encapsulates a `int` value.
- `MutableInt` - encapsulates an `int` value.
- `MutableFloat` - encapsulates a `float` value.
- `MutableString` - encapsulates a `string` value.
- `MutableVector2` - encapsulates a `Vector2` value.
Expand All @@ -71,7 +71,7 @@ Each mutable object has a `ResetType` property. This allows specifying when data
- `SceneLoaded` - when the scene is loaded.

### Custom game events
In some situations, built-in game events might not suffice. For example if a custom type needs to be passed as an argument to the event. In this case, custom game event can be created which would carry all the necessary data.
In some situations, built-in game events might not suffice. For example if a custom type needs to be passed as an argument to the event. In this case, a custom game event can be created which would carry all the necessary data.

To create a custom game event, first create a regular `UnityEvent`:
```cs
Expand All @@ -97,7 +97,7 @@ public class CustomGameEventListener : ArgumentGameEventListener<CustomGameEvent
}
```

Optionally add a custom editor so that the event could be raised, and the listeners which reference the event get displayed in the inspector.
, add a custom editor so that the event could be raised, and the listeners which reference the event get displayed in the inspector.
```cs
[CustomEditor(typeof(CustomGameEvent))]
public class GameObjectGameEventEditor : ArgumentGameEventEditor<CustomGameEvent, Custom>
Expand Down