Skip to content

Commit

Permalink
improve readability for AddListener(EventGeneric.OnGameClientJoined
Browse files Browse the repository at this point in the history
  • Loading branch information
valkyrienyanko committed Mar 11, 2023
1 parent b87b0bd commit 5bdacc8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Scripts/UI/UIPlayerList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ public void SetupListeners()
RemovePlayer((byte)args[0]);
});

Events.Generic.AddListener(EventGeneric.OnGameClientJoined, (args) =>
{
AddPlayer((byte)args[0], (string)args[1]);
});
Events.Generic.AddListener(EventGeneric.OnGameClientJoined, (args) =>
{
var id = (byte)args[0];
var name = (string)args[1];

AddPlayer(id, name);
});

Events.Generic.AddListener(EventGeneric.OnReceivePlayersFromServer, (args) =>
{
Expand Down

0 comments on commit 5bdacc8

Please sign in to comment.