Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
oleghcp committed Apr 23, 2024
1 parent f0030e0 commit 7579835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Runtime/OlegHcp/Events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ExampleEventListener1 : IDisposable
public ExampleEventListener1()
{
// Subscribe with priority 1
EventBus.Current.Subscribe<ExampleSignal>(1, OnGotEvent);
EventBus.Current.Subscribe<ExampleSignal>(OnGotEvent, 1);
}

private void OnGotEvent(ExampleSignal signal)
Expand All @@ -44,7 +44,7 @@ public class ExampleEventListener2 : IDisposable
public ExampleEventListener2()
{
// Subscribe with priority 2 which is lower than 1 and will executed after
EventBus.Current.Subscribe<ExampleSignal>(2, OnGotEvent);
EventBus.Current.Subscribe<ExampleSignal>(OnGotEvent, 2);
}

private void OnGotEvent(ExampleSignal signal)
Expand Down

0 comments on commit 7579835

Please sign in to comment.