Ejemplo n.º 1
0
        protected override void OnCreate()
        {
            predictUpdateSystemGroup = World.GetOrCreateSystem <PredictUpdateSystemGroup>();
            AddSystemToUpdateList(predictUpdateSystemGroup);

            applyPredictedStateSystemGroup = World.GetOrCreateSystem <ApplyPredictedStateSystemGroup>();
            // AddSystemToUpdateList(predictRollbackStateSystemGroup);
            inputSystem = World.GetOrCreateSystem <InputSystem>();
            replicateEntitySystemGroup = World.GetOrCreateSystem <ReplicateEntitySystemGroup>();
        }
Ejemplo n.º 2
0
        protected override void OnCreate()
        {
            base.OnCreate();

            replicateEntitySystemGroup = World.GetOrCreateSystem <ReplicateEntitySystemGroup>();

            EntityManager.CreateEntity(typeof(ServerSnapshot));
            SetSingleton(new ServerSnapshot
            {
                ServerTick        = 0,
                TimeSinceSnapshot = 0,
                Rtt = 0,
                LastAcknowledgedTick = 0
            });

            network = new NetworkClient(GameWorld.Active);
        }
        protected override void OnCreate()
        {
            FSLog.Info("KitchenClientSimulationSystemGroup OnCreate");

            ConfigVar.Init();
            GameWorld.Active = new GameWorld();
            ItemCreateUtilities.Init();
            ClientCharacterUtilities.Init();
            MenuUtilities.Init();
            IconUtilities.Init();
            Application.targetFrameRate     = 60;
            UnityEngine.Time.fixedDeltaTime = GameTick.DefaultGameTick.TickInterval;

            worldSceneEntitiesSystem = World.GetOrCreateSystem <WorldSceneEntitiesSystem>();
            m_systemsToUpdate.Add(worldSceneEntitiesSystem);

            networkSystem = World.GetOrCreateSystem <NetworkClientSystem>();
            m_systemsToUpdate.Add(networkSystem);

            handleTimeSystem = World.GetOrCreateSystem <HandleTimeSystem>();
            m_systemsToUpdate.Add(handleTimeSystem);

            setRenderTimeSystem = World.GetOrCreateSystem <SetRenderTimeSystem>();
            m_systemsToUpdate.Add(setRenderTimeSystem);

            replicateEntitySystemGroup = World.GetOrCreateSystem <ReplicateEntitySystemGroup>();
            m_systemsToUpdate.Add(replicateEntitySystemGroup);


            setPredictTimeSystem = World.GetOrCreateSystem <SetPredictTimeSystem>();
            m_systemsToUpdate.Add(setPredictTimeSystem);

            predictSystem = World.GetOrCreateSystem <PredictSystem>();
            m_systemsToUpdate.Add(predictSystem);

            itemClientSystemGroup = World.GetOrCreateSystem <ItemClientSystemGroup>();
            m_systemsToUpdate.Add(itemClientSystemGroup);


            predictPresentationSystemGroup = World.GetOrCreateSystem <PredictPresentationSystemGroup>();
            m_systemsToUpdate.Add(predictPresentationSystemGroup);

            despawnSystemGroup = World.GetOrCreateSystem <DespawnSystemGroup>();
            m_systemsToUpdate.Add(despawnSystemGroup);
        }