mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
more formatting (#1630)
This commit is contained in:
parent
c6501aab06
commit
f19e2d3aac
@ -336,12 +336,14 @@ public void SendCommandInternal()
|
||||
Assert.That(comp.called, Is.EqualTo(0));
|
||||
|
||||
// create a connection from client to server and from server to client
|
||||
ULocalConnectionToClient connection = new ULocalConnectionToClient {
|
||||
ULocalConnectionToClient connection = new ULocalConnectionToClient
|
||||
{
|
||||
isReady = true,
|
||||
// commands require authentication
|
||||
isAuthenticated = true
|
||||
};
|
||||
connection.connectionToServer = new ULocalConnectionToServer {
|
||||
connection.connectionToServer = new ULocalConnectionToServer
|
||||
{
|
||||
isReady = true,
|
||||
// commands require authentication
|
||||
isAuthenticated = true
|
||||
|
@ -449,7 +449,8 @@ public void OnDataReceivedTest()
|
||||
bool wasReceived = false;
|
||||
NetworkConnection connectionReceived = null;
|
||||
TestMessage messageReceived = new TestMessage();
|
||||
NetworkServer.RegisterHandler<TestMessage>((conn, msg) => {
|
||||
NetworkServer.RegisterHandler<TestMessage>((conn, msg) =>
|
||||
{
|
||||
wasReceived = true;
|
||||
connectionReceived = conn;
|
||||
messageReceived = msg;
|
||||
@ -497,7 +498,8 @@ public void OnDataReceivedInvalidConnectionIdTest()
|
||||
bool wasReceived = false;
|
||||
NetworkConnection connectionReceived = null;
|
||||
TestMessage messageReceived = new TestMessage();
|
||||
NetworkServer.RegisterHandler<TestMessage>((conn, msg) => {
|
||||
NetworkServer.RegisterHandler<TestMessage>((conn, msg) =>
|
||||
{
|
||||
wasReceived = true;
|
||||
connectionReceived = conn;
|
||||
messageReceived = msg;
|
||||
@ -632,7 +634,8 @@ public void CommandMessageCallsCommandTest()
|
||||
NetworkIdentity.spawned[identity.netId] = identity;
|
||||
|
||||
// serialize a removeplayer message into an arraysegment
|
||||
CommandMessage message = new CommandMessage {
|
||||
CommandMessage message = new CommandMessage
|
||||
{
|
||||
componentIndex = 0,
|
||||
functionHash = NetworkBehaviour.GetMethodHash(typeof(CommandTestNetworkBehaviour), nameof(CommandTestNetworkBehaviour.CommandGenerated)),
|
||||
netId = identity.netId,
|
||||
|
Loading…
Reference in New Issue
Block a user