本文整理汇总了C#中NetworkMode类的典型用法代码示例。如果您正苦于以下问题:C# NetworkMode类的具体用法?C# NetworkMode怎么用?C# NetworkMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NetworkMode类属于命名空间,在下文中一共展示了NetworkMode类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Start
public virtual void Start(Report Report)
{
InitializeRazor();
_report = Report;
_filePath = Report.FilePath;
_displayOrder = Report.DisplayOrder;
_networkMode = Report.NetworkMode;
Thread.CurrentThread.CurrentUICulture = Report.Culture;
bool replaceExisting = Report.ReplaceExisting;
if (!File.Exists(_filePath))
{
replaceExisting = true;
}
if (replaceExisting)
{
_extentSource = Extent.Source;
}
else
{
_extentSource = File.ReadAllText(_filePath);
}
_extentSource = _extentSource.Replace("<!--%SuiteStartedTime%-->", _report.StartTime.ToString());
}
开发者ID:MarcusChang,项目名称:extentreports,代码行数:30,代码来源:HTMLReporter.cs
示例2: HandshakePacket
public HandshakePacket(int protocolVersion, string hostname, ushort port, NetworkMode nextState)
{
ProtocolVersion = protocolVersion;
ServerHostname = hostname;
ServerPort = port;
NextState = nextState;
}
开发者ID:umby24,项目名称:Craft.Net,代码行数:7,代码来源:Packets.cs
示例3: Start
void Start()
{
#if UNITY_IOS
serverConnect.SetActive(false);
gameConnectPanel.gameObject.SetActive(false);
connectPanel.gameObject.SetActive(true);
#endif
//logLevel = LogFilter.FilterLevel.Debug;
GameObject es = GameObject.Find("EventSystem");
GameObject.DontDestroyOnLoad(es);
isPause = false;
SingletonNM = this;
currentMode = NetworkMode.Level;
selectedDifficulty = selectedDifficulty = LevelEnum.Unselected;
//currentPanel = connectPanel;
lobbyPlayerArray = new ArrayList(maxPlayers);
gameplayerControllers = new ArrayList(maxPlayers);
disconnectedPlayerControllers = new ArrayList(maxPlayers);
userNameSet = new HashSet<string>();
levels = new ArrayList(maxPlayers);
for (int i = 0; i < maxPlayers; i++)
{
lobbyPlayerArray.Add(null);
gameplayerControllers.Add(null);
disconnectedPlayerControllers.Add(null);
levels.Add(LevelEnum.Unselected);
}
lobbySystemStartSetting();
citizenshipZeroTime = 0;
//StartCoroutine(startLatency());
//infoPanel.DisplayDisconnectError("Client error : ", StopClientClbk, ReconnectClinetClbk);
}
开发者ID:charmjunewonder,项目名称:RiverRun,代码行数:34,代码来源:NetworkManagerCustom.cs
示例4: HandshakePacket
public HandshakePacket(int protocolVersion, string serverAddress, ushort port, NetworkMode nextState)
{
ProtocolVersion = protocolVersion;
ServerAddress = serverAddress;
Port = port;
NextState = nextState;
}
开发者ID:JarJarBings12,项目名称:CubeServer,代码行数:7,代码来源:Packets.cs
示例5: WritePacket
public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
{
stream.WriteVarInt(ProtocolVersion);
stream.WriteString(ServerHostname);
stream.WriteUInt16(ServerPort);
stream.WriteVarInt((int)NextState);
return NextState;
}
开发者ID:umby24,项目名称:Craft.Net,代码行数:8,代码来源:Packets.cs
示例6: ReadPacket
public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
{
ProtocolVersion = stream.ReadVarInt();
ServerHostname = stream.ReadString();
ServerPort = stream.ReadUInt16();
NextState = (NetworkMode)stream.ReadVarInt();
return NextState;
}
开发者ID:umby24,项目名称:Craft.Net,代码行数:8,代码来源:Packets.cs
示例7: ExtentReports
public ExtentReports(string FilePath, bool ReplaceExisting = true, DisplayOrder Order = DisplayOrder.OldestFirst, NetworkMode NetworkMode = NetworkMode.Online)
{
this.FilePath = FilePath;
this.ReplaceExisting = ReplaceExisting;
this.DisplayOrder = DisplayOrder;
this.NetworkMode = NetworkMode;
Attach(new HTMLReporter());
}
开发者ID:srigor,项目名称:extentreports,代码行数:9,代码来源:ExtentReports.cs
示例8: Network
Network()
{
networkThread = null;
mode = NetworkMode.HOST;
chatBuffer = new System.Collections.Generic.Queue<Chat>();
gameBuffer = new System.Collections.Generic.Queue<Action>();
ip = "127.0.0.1";
port = 10101;
stream = null;
}
开发者ID:kcm1700,项目名称:Getris,代码行数:10,代码来源:Network.cs
示例9: Networking
public Networking(Game game, ConnectionExitedDelegate ced, IPAddress ipAddress, int port, bool server)
{
this.game = game;
this.ced = ced;
this.ipAddress = ipAddress;
if (server)
{
this.networkMode = NetworkMode.SERVER;
this.server = new TCPServer(this, ipAddress, port);
}
else
{
this.networkMode = NetworkMode.CLIENT;
this.client = new TCPClient(this, ced, ipAddress, port);
}
}
开发者ID:Catchouli-old,项目名称:NetPool,代码行数:16,代码来源:Networking.cs
示例10: MinecraftStream
public MinecraftStream(Stream stream, NetworkMode mode)
{
_stream = stream;
Mode = mode;
switch (Mode)
{
case NetworkMode.Modern:
_encoding = Encoding.UTF8;
break;
case NetworkMode.Classic:
_encoding = Encoding.ASCII;
break;
}
}
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:16,代码来源:MinecraftStream.cs
示例11: Start
void Start()
{
node = NetworkNode.node;
if (node == null) //if null, no networking, server controls it if there is networking
{
mode = NetworkMode.UNKNOWN;
StartCoroutine(LocalGoalSpawning());
}
else if(node is Server)
{
mode = NetworkMode.LOCALSERVER;
StartCoroutine(ServerGoalSpawning());
}
else if (node is Client)
{
mode = NetworkMode.REMOTECLIENT;
node.Subscribe(this);
}
}
开发者ID:AlbearKamoo,项目名称:Witches-vs-Aliens-2015-2016,代码行数:19,代码来源:SuperGoalSpawner.cs
示例12: Create
/// <summary>
/// Create a new Minecraft Instance
/// </summary>
/// <param name="login">The username to use when connecting to Minecraft</param>
/// <param name="password">The password to use when connecting to Minecraft (Ignore if you are providing credentials)</param>
/// <param name="mode"></param>
/// <param name="nameVerification">To connect using Name Verification or not</param>
/// <param name="serverSalt"></param>
public IMinecraftClient Create(string login, string password, NetworkMode mode, bool nameVerification = false, string serverSalt = null)
{
ClientLogin = login;
ClientPassword = password;
UseLogin = nameVerification;
Mode = mode;
ServerSalt = serverSalt;
AsyncReceiveHandlers = new Dictionary<Type, Action<IAsyncReceive>>();
RegisterSupportedReceiveEvents();
World = new World();
Player = new Player();
Entities = new Dictionary<int, Entity>();
PlayersList = new Dictionary<string, short>();
_networkHandler = new NetworkHandler();
_networkHandler.Create(this);
return this;
}
开发者ID:DefinitlyEvil,项目名称:MineLib.ClientWrapper,代码行数:29,代码来源:Minecraft.cs
示例13: Start
void Start()
{
node = NetworkNode.node;
if (node == null) //if null, no networking, server controls it if there is networking
{
mode = NetworkMode.UNKNOWN;
}
else if (node is Server)
{
mode = NetworkMode.LOCALSERVER;
node.Subscribe(this);
}
else if (node is Client)
{
mode = NetworkMode.REMOTECLIENT;
node.Subscribe(this);
}
for (int i = 0; i < charactersData.Length; i++)
{
charactersData[i].characterID = i;
}
}
开发者ID:AlbearKamoo,项目名称:Witches-vs-Aliens-2015-2016,代码行数:23,代码来源:PlayerRegistration.cs
注:本文中的NetworkMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论