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);
 }
Exemple #2
0
    /// <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;
    }
 void Start()
 {
     if (PhotonNetwork.connectedAndReady)
     {
         crosslevelholder = GameObject.Find("CrossLevelVariables").GetComponent <CrossLevelVariableHolder>();
     }
     OnActive();
     // Get the game controller
     _gc          = GameObject.FindObjectOfType <GameController>();
     simObject    = this.GetComponent <DFNetwork.Simulation.SimulationLayer>();
     FleetBuilder = IORoot.findIO("fleet1");
     FleetBuilder.read();
 }
 /// <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;
 }