public EncounterSelectionLoader(EncounterSelectionContext encounterSelectionContext,
                                 ICommandQueue commandQueue,
                                 ICommandHistoryLoader commandHistoryLoader,
                                 IMapSelectViewController mapSelectViewController,
                                 IReplayLoaderViewController replayLoaderViewController)
 {
     _encounterSelectionContext = encounterSelectionContext;
     _commandQueue               = commandQueue;
     _commandHistoryLoader       = commandHistoryLoader;
     _mapSelectViewController    = mapSelectViewController;
     _replayLoaderViewController = replayLoaderViewController;
 }
示例#2
0
        public override void InstallBindings()
        {
            EncounterSelectionContext context = new EncounterSelectionContext();

            Container.Bind <IEncounterSelectionContext>().To <EncounterSelectionContext>().FromInstance(context);

            if (showEncounterSelectionView)
            {
                Container.Bind <EncounterSelectionContext>().FromInstance(context).AsSingle()
                .WhenInjectedInto <EncounterSelectionLoader>();
                Container.BindInterfacesTo <EncounterSelectionLoader>().AsSingle();
            }
            else
            {
                context.EncounterType = EncounterType.Replay;
            }

            // Network commands are safe to be executed at this point.
            Container.Install <NetworkCommandsInstaller>();
        }