public EndlessClientInitializer(IEndlessGame game,
                                        IEndlessGameRepository endlessGameRepository,
                                        IContentManagerRepository contentManagerRepository,
                                        IKeyboardDispatcherRepository keyboardDispatcherRepository,
                                        PacketHandlerGameComponent packetHandlerGameComponent,

                                        //Todo: refactor method injection to something like IEnumerable<IMethodInjectable>
                                        IMainButtonController mainButtonController,
                                        IAccountController accountController,
                                        ILoginController loginController,
                                        ICharacterManagementController characterManagementController,
                                        IChatController chatController,
                                        IControlSetFactory controlSetFactory,
                                        ICharacterInfoPanelFactory characterInfoPanelFactory,
                                        IHudControlsFactory hudControlsFactory)
        {
            _game = game;
            _endlessGameRepository        = endlessGameRepository;
            _contentManagerRepository     = contentManagerRepository;
            _keyboardDispatcherRepository = keyboardDispatcherRepository;
            _packetHandlerGameComponent   = packetHandlerGameComponent;
            _mainButtonController         = mainButtonController;
            _accountController            = accountController;
            _loginController = loginController;
            _characterManagementController = characterManagementController;
            _chatController            = chatController;
            _controlSetFactory         = controlSetFactory;
            _characterInfoPanelFactory = characterInfoPanelFactory;
            _hudControlsFactory        = hudControlsFactory;
        }
Пример #2
0
 public void InjectControllers(IMainButtonController mainButtonController,
                               IAccountController accountController,
                               ILoginController loginController,
                               ICharacterManagementController characterManagementController)
 {
     _mainButtonController          = mainButtonController;
     _accountController             = accountController;
     _loginController               = loginController;
     _characterManagementController = characterManagementController;
 }
Пример #3
0
 public LoggedInControlSet(KeyboardDispatcher dispatcher,
                           IMainButtonController mainButtonController,
                           ICharacterInfoPanelFactory characterInfoPanelFactory,
                           ICharacterManagementController characterManagementController,
                           IAccountController accountController)
     : base(dispatcher, mainButtonController)
 {
     _characterInfoPanelFactory     = characterInfoPanelFactory;
     _characterManagementController = characterManagementController;
     _accountController             = accountController;
     _characterInfoPanels           = new List <CharacterInfoPanel>();
 }
Пример #4
0
        public CharacterInfoPanel(int characterIndex,
                                  ICharacter character,
                                  INativeGraphicsManager gfxManager,
                                  IEODialogButtonService dialogButtonService,
                                  ILoginController loginController,
                                  ICharacterManagementController characterManagementController,
                                  ICharacterRendererFactory rendererFactory,
                                  IRendererRepositoryResetter rendererRepositoryResetter)
            : this(characterIndex, gfxManager, dialogButtonService)
        {
            _character       = character;
            _loginController = loginController;
            _characterManagementController = characterManagementController;
            _rendererRepositoryResetter    = rendererRepositoryResetter;

            _characterControl = new CharacterControl(character.RenderProperties, rendererFactory)
            {
                DrawPosition = new Vector2(68, 28)
            };
            _characterControl.SetParentControl(this);

            _nameLabel = new XNALabel(Constants.FontSize08pt5)
            {
                DrawArea  = GetNameLabelLocation(),
                ForeColor = ColorConstants.BeigeText,
                Text      = CapitalizeName(character.Name),
                TextAlign = LabelAlignment.MiddleCenter,
                AutoSize  = false
            };
            _nameLabel.SetParentControl(this);

            _levelLabel = new XNALabel(Constants.FontSize08pt75)
            {
                DrawArea  = GetLevelLabelLocation(),
                ForeColor = ColorConstants.BeigeText,
                Text      = character.Stats.Stats[CharacterStat.Level].ToString()
            };
            _levelLabel.SetParentControl(this);

            _adminGraphic = CreateAdminGraphic(character.AdminLevel);
        }
 public void InjectCharacterManagementController(ICharacterManagementController characterManagementController)
 {
     _characterManagementController = characterManagementController;
 }