예제 #1
0
        private void InitCommonSession(
            EntityIdGenerator entityIdGenerator,
            EntityIdGenerator equipmentEntityIdGenerator, int ruleId)
        {
            _contexts.session.SetCommonSession();
            var commonSession = _contexts.session.commonSession;

            commonSession.InitPosition = Vector3.zero;

            commonSession.AssetManager = _assetManager;

            commonSession.CoRoutineManager = _coRoutineManager;
            commonSession.GameContexts     =
                GameContextsUtility.GetReplicationGameContexts(_contexts, _bin2DManager);
            commonSession.EntityIdGenerator          = entityIdGenerator;
            commonSession.EquipmentEntityIdGenerator = equipmentEntityIdGenerator;
            commonSession.RoomInfo = new RoomInfo
            {
                MapId  = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.MapId,
                ModeId = ruleId
            };
            commonSession.RuntimeGameConfig   = new RuntimeGameConfig();
            commonSession.BulletInfoCollector = new ServerBulletInfoCollector();

            MakeWeaponLogicManager();
        }
예제 #2
0
        private void InitCommonSession(EntityIdGenerator entityIdGenerator,
                                       EntityIdGenerator equipmentEntityIdGenerator)
        {
            _contexts.session.SetCommonSession();
            var commonSession = _contexts.session.commonSession;

            commonSession.GameContexts               = GameContextsUtility.GetReplicationGameContexts(_contexts);
            commonSession.CoRoutineManager           = _coRoutineManager;
            commonSession.AssetManager               = _assetManager;
            commonSession.EntityIdGenerator          = entityIdGenerator;
            commonSession.EquipmentEntityIdGenerator = equipmentEntityIdGenerator;
            commonSession.RoomInfo = new Core.Room.RoomInfo();
            //commonSession.PlayerStateCollectorPool = new PlayerStateCollectorPool();
            commonSession.FreeArgs      = new FreeRuleEventArgs(_contexts);
            commonSession.FreeArgs.Rule = new ClientRule(commonSession.FreeArgs);
            commonSession.InitPosition  = Vector3.zero;
        }
예제 #3
0
    private void InitCommonSession(IBin2DManager bin2DManager, EntityIdGenerator entityIdGenerator,
                                   EntityIdGenerator equipmentEntityIdGenerator, int ruleId,
                                   IUnityAssetManager assetManager, ICoRoutineManager coRoutineManager)
    {
        contexts.session.SetCommonSession();
        var commonSession = contexts.session.commonSession;

        commonSession.InitPosition = Vector3.zero;

        commonSession.AssetManager = assetManager;

        commonSession.CoRoutineManager = coRoutineManager;
        commonSession.GameContexts     =
            GameContextsUtility.GetReplicationGameContexts(contexts, bin2DManager);
        commonSession.EntityIdGenerator          = entityIdGenerator;
        commonSession.EquipmentEntityIdGenerator = equipmentEntityIdGenerator;
        commonSession.RoomInfo = new RoomInfo
        {
            MapId  = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.MapId,
            ModeId = ruleId
        };

        MakeWeaponLogicManager();
    }