public static void Simulate()
 {
     if (Registered == false)
     {
         if (NetworkHelper.IsConnected)
         {
             Register();
             Registered = true;
         }
         return;
     }
     if (SimulateNetworking)
     {
     }
     else
     {
         if (isConnected)
         {
             while (bufferedSendData.Count > 0)
             {
                 Distribute(bufferedSendData.Pop());
             }
             if (NetworkHelper.IsServer)
             {
                 LSServer.Simulate();
             }
         }
     }
 }
Beispiel #2
0
        internal static void Deactivate()
        {
            DefaultMessageRaiser.EarlyDeactivate();

            if (GameStarted == false)
            {
                return;
            }

            Selector.Clear();
            AgentController.Deactivate();
            BehaviourHelperManager.Deactivate();
            ProjectileManager.Deactivate();
            EffectManager.Deactivate();
            ClientManager.Deactivate();

            ClientManager.Quit();
            PhysicsManager.Deactivate();
            GameStarted = false;
            LSServer.Deactivate();
            DefaultMessageRaiser.LateDeactivate();
            CoroutineManager.Deactivate();

            DefaultMessageRaiser.Reset();
        }
 public static void Setup()
 {
     if (SimulateNetworking)
     {
         ServerSimulator.Setup();
     }
     LSServer.Setup();
 }
        public static void Initialize(NetworkHelper networkHelper)
        {
            NetworkHelper              = networkHelper;
            NetworkHelper.OnFrameData += HandleFrameData;
            NetworkHelper.OnInitData  += HandleInitData;
            NetworkHelper.Initialize();

            LSServer.Initialize();
            GameStarted = false;
            if (SimulateNetworking)
            {
                ServerSimulator.Initialize();
            }
            else
            {
            }
            Registered = false;
        }