コード例 #1
0
 public void StartServer(ushort port, int maxPlayers, INetworkMediator netMediator)
 {
     networkMediator = netMediator;
     _socket.Listen(port, MAX_PARALLEL_CONNECTION_REQUEST);
     CancellationSource = new CancellationTokenSource();
     NetPlayerId        = AbstractFactory.Get <INetworkTypeFactory>().GetNew <IPlayerSignature>();
     Task.Run(ReadNetwork, CancellationSource.Token);
 }
コード例 #2
0
 public override void Deserialize(BMSByte buffer)
 {
     Id            = ForgeSerializer.Instance.Deserialize <int>(buffer);
     PrefabId      = ForgeSerializer.Instance.Deserialize <int>(buffer);
     ProxyPrefabId = ForgeSerializer.Instance.Deserialize <int>(buffer);
     Position      = ForgeSerializer.Instance.Deserialize <Vector3>(buffer);
     Rotation      = ForgeSerializer.Instance.Deserialize <Quaternion>(buffer);
     Scale         = ForgeSerializer.Instance.Deserialize <Vector3>(buffer);
     OwningPlayer  = ForgeSerializer.Instance.Deserialize <IPlayerSignature>(buffer);
 }
コード例 #3
0
 public PlayerNotFoundException(IPlayerSignature id)
     : base($"A player with the id {id} could not be found in the repository")
 {
 }
コード例 #4
0
 public override void Deserialize(BMSByte buffer)
 {
     Identity = ForgeSerializer.Instance.Deserialize <IPlayerSignature>(buffer);
 }