Ejemplo n.º 1
0
        private HotFixClient()
        {
            "log".Log("Application will run almost in hot fix client..");
            mCommonUpdaters = new CommonUpdaters();

            mStateMapper = new KeyValueList <IState, IUpdate>();
            mFSMMapper   = new KeyValueList <IStateMachine, IUpdate>();

            Modulars = new DecorativeModulars();
            Configs  = new ConfigHelper();
            Datas    = new DataWarehouse();
            FSMs     = new StateMachines
            {
                FSMFrameUpdater   = OnFSMFrameUpdater,
                StateFrameUpdater = OnStateFrameUpdater,
            };

            Sounds = new SoundEffects();
            Sounds.Init();

            #region 对主工程框架中热更端需要覆盖的各功能单元做重填充,以使得相同功能的代码定义转移到热更端
            Framework framework = Framework.Instance;
            framework.ReloadUnit(new IFrameworkUnit[] {
                framework.CreateUnitByBridge(Framework.UNIT_MODULARS, Modulars),
                framework.CreateUnitByBridge(Framework.UNIT_CONFIG, Configs),
                framework.CreateUnitByBridge(Framework.UNIT_DATA, Datas),
                framework.CreateUnitByBridge(Framework.UNIT_FSM, FSMs),
                framework.CreateUnitByBridge(Framework.UNIT_SOUND, Sounds),
            });
            #endregion
        }
Ejemplo n.º 2
0
        public BattleInfoController(BattleFields info) : base(info)
        {
            mCommonUpdaters = new CommonUpdaters();

            AddListener(Consts.N_START_COLLECT_INTELLIGENTAL, OnStartCollectIntelligental);
        }