public void Initialize(DFNetwork.Networking.aNetworkLayer netLayer, DFNetwork.Simulation.SimulationLayer simLayer) { // Register the "MoveObject" command //LS_NETSIM.NetworkLayer.Commands.LS_CommandRegistry.RegisterCommand("MoveObject", 3, Serialize, Deserialize, ProcessCommand, ProcessCommands); // Register the "MoveObjects" command //LS_NETSIM.NetworkLayer.Commands.LS_CommandRegistry.RegisterCommand("MoveObjects", 3, Serialize, Deserialize, ProcessCommand, ProcessCommands); }
private void RenderPackets() { DFNetwork.Networking.aNetworkLayer h = (DFNetwork.Networking.aNetworkLayer)target; EditorGUILayout.BeginVertical(DFNetwork.Helpers.EditorStyling.GetDefaultStyle); { #region User Packet Types // Get the available modules #region Show Packets // Update cache if nothing exists if (h.PacketRegistry.GetCommandNameList.Count == 0) { h.PacketRegistry.RefreshCache(); } // Draw the GUI foreach (string nme in h.PacketRegistry.GetCommandNameList) { EditorGUILayout.LabelField(nme); } if (GUILayout.Button("Refresh Packet List")) { // Get the packet handler instance h.PacketRegistry.RefreshCache(); } #endregion #endregion } EditorGUILayout.EndVertical(); }
/// <summary> /// Initialize this instance /// </summary> /// <param name='netLayer'> /// Net layer. /// </param> /// <param name='simLayer'> /// Sim layer. /// </param> public void Initialize(DFNetwork.Networking.aNetworkLayer netLayer, DFNetwork.Simulation.SimulationLayer simLayer) { NetLayer = netLayer; // Grab the room join / left event NetLayer.OnRoomJoined += OnRoomJoined; NetLayer.OnRoomLeft += OnRoomLeft; // We need to know when a player connects / disconnects NetLayer.OnPlayerConnected += PlayerConnect; NetLayer.OnPlayerDisconnected += PlayerDisconnected; }
/// <summary> /// Register the scene loader module /// </summary> public void Initialize(DFNetwork.Networking.aNetworkLayer netLayer, DFNetwork.Simulation.SimulationLayer simLayer) { NetLayer = netLayer; }
/// <summary> /// Initialize this instance. /// </summary> /// <param name="netLayer">Net layer.</param> /// <param name="simLayer">Sim layer.</param> public void Initialize(DFNetwork.Networking.aNetworkLayer netLayer, DFNetwork.Simulation.SimulationLayer simLayer) { _gc = GameObject.FindObjectOfType <GameController>(); NetLayer = netLayer; SimLayer = simLayer; }