Пример #1
0
 public static NeutronPlayer MakeTheServerPlayer(NeutronChannel channel, NeutronRoom room, INeutronMatchmaking matchmaking)
 {
     return(new NeutronPlayer()
     {
         Nickname = "Server",
         Id = 0,
         Channel = channel,
         Room = room,
         Matchmaking = matchmaking,
     });
 }
Пример #2
0
 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);
             }
         }
     }
 }
Пример #3
0
 protected override void OnPlayerJoinedChannel(NeutronChannel channel, NeutronPlayer player, bool isMine, Neutron neutron)
 {
     base.OnPlayerJoinedChannel(channel, player, isMine, neutron);
 }