protected override void OnCreate() { base.OnCreate(); EntityManager.CreateEntity(typeof(UserCommand)); SetSingleton(UserCommand.DefaultCommand); networkClient = World.GetExistingSystem <NetworkClientSystem>(); }
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); }