Skip to content

Commit

Permalink
Added working multiplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
vizorian committed Sep 29, 2021
1 parent 730273a commit e93ac1f
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 7 deletions.
Binary file modified .vs/SignalR-GameServer/v16/.suo
Binary file not shown.
Binary file modified .vs/hoboking/v16/.suo
Binary file not shown.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
2 changes: 1 addition & 1 deletion HoboKing/Entities/Connector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Connector()

Connection.On<int>("ReceivePlayerCount", (player_count) =>
{
Console.WriteLine("Received data from server the player count: " + player_count);
Console.WriteLine("Received count data from server. Current player count: " + player_count);
});
}

Expand Down
4 changes: 2 additions & 2 deletions HoboKing/HoboKingGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public class HoboKingGame : Game
private EntityManager entityManager;
private Connector connector;

private float timer = 1.0f;
const float TIMER = 1.0f;
private float timer = 0.1f;
const float TIMER = 0.1f;

public HoboKingGame()
{
Expand Down
5 changes: 2 additions & 3 deletions SignalR-GameServer-v1/Hubs/GameHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ public override Task OnConnectedAsync()
_ = SendPlayerCount();

foreach (string connectedId in PlayerHandler.ConnectedIds)
{
_ = SendPlayerIdTargeted(connectedId);
}
if(connectedId != Context.ConnectionId)
_ = SendPlayerIdTargeted(connectedId);

return base.OnConnectedAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAzIMo/hRpl0q/1WX6RuG3qQAAAAACAAAAAAAQZgAAAAEAACAAAABNvY1/S0LDliBqgBKMD7p521VMsKl5G9dTIqQkJRrQOAAAAAAOgAAAAAIAACAAAAAdTOHz0CwxlRpKLrnsQQYjSXSiCGXAtCrWWokTJJGuhYAAAABOXesXam/zKVqBpEVWTkSrMDcJ94up/bUUiGBdD9ar3EXiQ23xqB7OKmQRUBNOgixYXM1eKaJOwg0fxBAPAbyEohnNwTwIdVrCm1wWkfL6ZAcU7wh0dYMxsM4bsosqJv5W7ChRzwzp7TRhAvQoG7iMXXFZWnN3TMWgmU+v+RVhnUAAAADCIvqSsJOqDKjELISZxhzrzOHqM7jKJl7KdWPJwElxVHLmXvxnDWjH+u44encJ1val9X/2mNTsx1kypV59iggi</EncryptedPassword>
<History>True|2021-09-29T13:11:02.2899902Z;True|2021-09-26T18:27:58.1081910+03:00;True|2021-09-26T18:22:53.2200248+03:00;True|2021-09-26T18:17:50.2437901+03:00;True|2021-09-26T17:41:12.3482787+03:00;True|2021-09-21T13:31:31.5791157+03:00;True|2021-09-21T12:39:24.6637129+03:00;True|2021-09-21T12:22:08.6114806+03:00;True|2021-09-21T12:11:18.4486942+03:00;True|2021-09-21T11:53:04.2400193+03:00;False|2021-09-21T11:49:32.7351092+03:00;</History>
<History>True|2021-09-29T13:44:30.2271342Z;True|2021-09-29T16:39:15.7460546+03:00;True|2021-09-29T16:11:02.2899902+03:00;True|2021-09-26T18:27:58.1081910+03:00;True|2021-09-26T18:22:53.2200248+03:00;True|2021-09-26T18:17:50.2437901+03:00;True|2021-09-26T17:41:12.3482787+03:00;True|2021-09-21T13:31:31.5791157+03:00;True|2021-09-21T12:39:24.6637129+03:00;True|2021-09-21T12:22:08.6114806+03:00;True|2021-09-21T12:11:18.4486942+03:00;True|2021-09-21T11:53:04.2400193+03:00;False|2021-09-21T11:49:32.7351092+03:00;</History>
</PropertyGroup>
</Project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit e93ac1f

Please sign in to comment.