public static NeutronPlayer MakeTheServerPlayer(NeutronChannel channel, NeutronRoom room, INeutronMatchmaking matchmaking) { return(new NeutronPlayer() { Nickname = "Server", Id = 0, Channel = channel, Room = room, Matchmaking = matchmaking, }); }
protected override void OnPlayerJoinedChannel(NeutronChannel channel, NeutronPlayer player, bool isMine, Neutron neutron) { base.OnPlayerJoinedChannel(channel, player, isMine, neutron); { if (isMine) { using (NeutronStream stream = new NeutronStream()) { var writer = neutron.BeginPlayer(stream, Vector3.zero, Quaternion.identity); writer.Write(); neutron.EndPlayer(stream, 10); } } } }
protected override void OnPlayerJoinedChannel(NeutronChannel channel, NeutronPlayer player, bool isMine, Neutron neutron) { base.OnPlayerJoinedChannel(channel, player, isMine, neutron); }