The network class is at the heart of the network implementation and provides the core functions.

예제 #1
0
파일: Build.cs 프로젝트: mpendel/RUSTBOYS
 void SendEchoConsole(Network.Connection cn, string msg)
 {
     if (Network.Net.sv.IsConnected())
     {
         Network.Net.sv.write.Start();
         Network.Net.sv.write.PacketID(Network.Message.Type.ConsoleMessage);
         Network.Net.sv.write.String(msg);
         Network.Net.sv.write.Send(new Network.SendInfo(cn));
     }
 }
예제 #2
0
 private void CanClientLogin(Network.Connection connection)
 {
     HookCalled("CanClientLogin");
 }
예제 #3
0
 public static void OnRemoteAction(Network.UserUI ui)
 {
     Log.debug("UserUI: {0}",ui);
     if (ui != null) Log.debug("UserUI.emoteInfo: {0}",ui.emoteInfo);
     if (ui != null && ui.emoteInfo != null) Log.debug("Emote: {0}",ui.emoteInfo.Emote);
     if (Instance.eventListener != null)
     {
         if (ui != null && ui.emoteInfo != null) Instance.eventListener.notifyEvent(new Message("emoteInfo", ui.emoteInfo));            
     }
 }
예제 #4
0
 private void OnUserApprove(Network.Connection connection)
 {
     HookCalled("OnUserApprove");
 }
예제 #5
0
 private void OnPlayerConnected(Network.Message packet)
 {
     HookCalled("OnPlayerConnected");
     // TODO: Print player connected
 }
예제 #6
0
파일: Hooks.cs 프로젝트: 906507516/Oxide
 private void OnPlayerConnected(Network.Message packet)
 {
     HookCalled("OnPlayerConnected");
     Puts($"{packet.connection.username} ({packet.connection.userid}) connected!");
 }
예제 #7
0
파일: NodeTest.cs 프로젝트: Greg-Rus/Linker
 public void Init()
 {
     testNetworkObject = GameObject.Instantiate(AssetDatabase.LoadAssetAtPath ("Assets/Prefabs/Network.prefab", typeof(GameObject)), Vector3.zero, Quaternion.identity) as GameObject;
     testNetwork = testNetworkObject.GetComponent<Network> ();
     testNetworkProbe = new Probe<Network> (testNetwork);
 }
예제 #8
0
파일: NodeTest.cs 프로젝트: Greg-Rus/Linker
 public void Init()
 {
     testNetworkObject = GameObject.Instantiate(AssetDatabase.LoadAssetAtPath ("Assets/Prefabs/Network.prefab", typeof(GameObject)), Vector3.zero, Quaternion.identity) as GameObject;
     testNetwork = testNetworkObject.GetComponent<Network> ();
     testNetworkProbe = new Probe<Network> (testNetwork);
     testNetwork.initialize (3, 3);
     map = testNetworkProbe.getField ("networkMap") as NodeController[,];
 }