public static void Deactivate()
        {
            NetworkHelper.OnFrameData -= HandleFrameData;
            NetworkHelper.OnInitData  -= HandleInitData;

            GameStarted = false;
            ServerSimulator.Stop();
        }
 public static void Setup()
 {
     if (SimulateNetworking)
     {
         ServerSimulator.Setup();
     }
     LSServer.Setup();
 }
Esempio n. 3
0
        public static void Setup(NetworkHelper networkHelper)
        {
            NetworkHelper = networkHelper;
            if (SimulateNetworking)
            {
                ServerSimulator.Setup();
            }

            NetworkHelper.OnFrameData += HandleFrameData;
            NetworkHelper.OnInitData  += HandleInitData;
            LSServer.Setup();
        }
Esempio n. 4
0
 public static void Initialize()
 {
     LSServer.Initialize();
     GameStarted = false;
     if (SimulateNetworking)
     {
         ServerSimulator.Initialize();
     }
     else
     {
     }
     Registered = false;
 }
        public static void Initialize(NetworkHelper networkHelper)
        {
            NetworkHelper              = networkHelper;
            NetworkHelper.OnFrameData += HandleFrameData;
            NetworkHelper.OnInitData  += HandleInitData;

            LSServer.Initialize();
            GameStarted = false;
            if (SimulateNetworking)
            {
                ServerSimulator.Initialize();
            }
            else
            {
            }
            Registered = false;
        }
 public static void Distribute(byte[] data)
 {
     if (SimulateNetworking)
     {
         ServerSimulator.Receive(data);
     }
     else
     {
         if (isConnected)
         {
             SendMessageToServer(MessageType.Input, data);
         }
         else
         {
             bufferedSendData.Add(data);
         }
     }
 }
Esempio n. 7
0
 public static void Deactivate()
 {
     GameStarted = false;
     ServerSimulator.Stop();
 }