The network class is at the heart of the network implementation and provides the core functions.
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)); } }
private void CanClientLogin(Network.Connection connection) { HookCalled("CanClientLogin"); }
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)); } }
private void OnUserApprove(Network.Connection connection) { HookCalled("OnUserApprove"); }
private void OnPlayerConnected(Network.Message packet) { HookCalled("OnPlayerConnected"); // TODO: Print player connected }
private void OnPlayerConnected(Network.Message packet) { HookCalled("OnPlayerConnected"); Puts($"{packet.connection.username} ({packet.connection.userid}) connected!"); }
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); }
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[,]; }