public override Systems CreateUpdateSystems(IContexts contexts1)
        {
            var gameModule = new CompositeGameModule();
            var contexts   = contexts1 as Contexts;

            var loadSceneSystem = new InitialSceneLoadingSystem(this, contexts, null, true);

            loadSceneSystem.AsapMode = true;
            gameModule.AddSystem(loadSceneSystem);
            gameModule.AddSystem(new InitTriggerObjectManagerSystem(contexts));

            gameModule.AddSystem(new ServerScenePostprocessorSystem(contexts.session.commonSession));
            //gameModule.AddModule(new ResourcePreloadModule(this));

            var featrue = new ServerPrepareFeature("loadMapConfig", gameModule, contexts.session.commonSession.AssetManager);

            featrue.Add(new MapConfigInitModule(contexts, this));
            if (contexts.session.commonSession.RoomInfo.MapId == 2)
            {
                contexts.session.commonSession.InitPosition = new Vector3(1906, 20, -1964);
            }
            else
            {
                contexts.session.commonSession.InitPosition = Vector3.zero;
            }
            return(featrue);
        }
示例#2
0
        public override Systems CreateUpdateSystems(IContexts contexts1)
        {
            var gameModule = new CompositeGameModule();
            var contexts   = contexts1 as Contexts;

            var loadSceneSystem = new InitialSceneLoadingSystem(this, contexts, null, true);

            loadSceneSystem.AsapMode = true;
            gameModule.AddSystem(loadSceneSystem);
            gameModule.AddSystem(new InitTriggerObjectManagerSystem(contexts));

            gameModule.AddSystem(new ServerScenePostprocessorSystem(contexts.session.commonSession));
            //gameModule.AddModule(new ResourcePreloadModule(this));
            var featrue = new ServerPrepareFeature("loadMapConfig", gameModule, contexts.session.commonSession);

            return(featrue);
        }
示例#3
0
        private CompositeGameModule CreateCompositeGameModule(Contexts contexts)
        {
            var gameModule = new CompositeGameModule();

            var loadSceneSystem = new InitialSceneLoadingSystem(this, contexts, new StreamingGoByDistance(), _isServer);

            loadSceneSystem.AsapMode = _loadSceneAsap;
            gameModule.AddSystem(loadSceneSystem);
            gameModule.AddSystem(new InitTriggerObjectManagerSystem(contexts));
            gameModule.AddSystem(new GameObjectRecordSystem(contexts));
            gameModule.AddSystem(new ClientScenePostprocessorSystem(contexts.session.commonSession));
            gameModule.AddSystem(new TerrainRendererInitSystem(contexts.session.commonSession,
                                                               contexts.session.clientSessionObjects));
            gameModule.AddSystem(new ClientWorldShiftPostProcessSystem(contexts.session.commonSession));

            gameModule.AddSystem(new TerrainDataLoadSystem(this, contexts));

            return(gameModule);
        }