예제 #1
0
        public CharacterPanel(IStatsSubPanel statsSubPanel,
                              IDamageTypesSubPanel armorSubPanel,
                              IDamageTypesSubPanel damageSubPanel,
                              IDamageTypesSubPanel resistanceSubPanel,
                              IDamageTypesSubPanel damagePercentSubPanel,
                              IOffensiveSubPanel offensiveSubPanel,
                              IUIStateTracker uiStateTracker,
                              IUICharacterManager uiCharacterManager)
        {
            MaxHeight           = 31;
            MaxWidth            = 40;
            MinPrimaryBlockSize = 6;
            FocusNumber         = 1;
            _statsSubPanel      = statsSubPanel;
            _armorSubPanel      = armorSubPanel;
            // All panels on the right side must have max size deducted by 1 to make room for space seperator
            _armorSubPanel.PanelName = "Armor";
            _armorSubPanel.MaxWidth--;
            _damageSubPanel               = damageSubPanel;
            _damageSubPanel.PanelName     = "Damage";
            _resistanceSubPanel           = resistanceSubPanel;
            _resistanceSubPanel.PanelName = "Resistances";
            _resistanceSubPanel.MaxWidth--;
            _damagePercentSubPanel           = damagePercentSubPanel;
            _damagePercentSubPanel.PanelName = "Bonus Damage";
            _offensiveSubPanel  = offensiveSubPanel;
            _uiStateTracker     = uiStateTracker;
            _uiCharacterManager = uiCharacterManager;
            _offensiveSubPanel.MaxWidth--;
            IsSubPanelActive = false;

            BindEvents();
        }
예제 #2
0
        public CombatUI(ICombatController combatController,
                        IUICharacterManager uiCharacterManager,
                        GameUIConstants gameUIConstants,
                        IUIContainer uiContainer,
                        UserInput userInput,
                        IUIStateTracker defaultsHandler,
                        IDisplayManager displayManager,
                        IDisplayCombatState combatStateHandler)
        {
            _combatController   = combatController;
            _displayManager     = displayManager;
            _combatStateHandler = combatStateHandler;
            _defaultsHandler    = defaultsHandler;

            _uiCharacterManager                      = uiCharacterManager;
            _uiCharacterManager.Characters           = _displayManager.GetDisplayCharacters();
            _uiCharacterManager.CurrentRoundOrderIds = _combatStateHandler.GetRoundOrderIds()[0];
            _uiCharacterManager.NextRoundOrderIds    = _combatStateHandler.GetRoundOrderIds()[1];

            _uiContainer = uiContainer;

            _userInput = userInput;

            BindEvents();
            RefreshActionPanelList();
        }
예제 #3
0
 public TurnOrderPanel(IUIStateTracker defaultsHandler,
                       IDisplayCombatState combatStateHandler,
                       IUICharacterManager uiCharacterManager)
 {
     MaxWidth            = 51;
     _defaultsHandler    = defaultsHandler;
     _combatStateHandler = combatStateHandler;
     _uiCharacterManager = uiCharacterManager;
 }
예제 #4
0
 public TargetPanel(IUIStateTracker defaultsHandler,
                    IUICharacterManager uiCharacterManager,
                    IDisplayCombatState combatStateHandler)
 {
     _widthOfHealthBar   = _maxWidth - 2;
     _defaultsHandler    = defaultsHandler;
     _uiCharacterManager = uiCharacterManager;
     _combatStateHandler = combatStateHandler;
 }
예제 #5
0
 public FormationPanel(IUIStateTracker defaultsHandler,
                       IUICharacterManager uiCharacterManager)
 {
     TargetPositions     = new List <int>();
     _characters         = new List <IDisplayCharacter>();
     MaxWidth            = 119;
     MaxHeight           = 31;
     _defaultsHandler    = defaultsHandler;
     _uiCharacterManager = uiCharacterManager;
 }
예제 #6
0
        public UserInput(IUIStateTracker defaultsHandler,
                         IUIContainer uiContainer,
                         IUICharacterManager uiCharacterManager,
                         GameUIConstants gameUIConstants)
        {
            _defaultsHandler    = defaultsHandler;
            _uiContainer        = uiContainer;
            _uiCharacterManager = uiCharacterManager;
            _gameUIConstants    = gameUIConstants;

            BindEvents();
        }
예제 #7
0
        public UIContainer(IFormationPanel formationPanel,
                           ITargetPanel targetPanel,
                           ICommandPanel commandPanel,
                           IActionPanel actionPanel,
                           ITurnOrderPanel turnOrderPanel,
                           IActionDetailsPanel actionDetailsPanel,
                           ICategoryDetailsPanel categoryDetailsPanel,
                           ICombatLogPanel combatLogPanel,
                           ICharacterPanel characterPanel,
                           IStatusEffectsPanel statusEffectsPanel,
                           IStatsDetailsPanel statsDetailsPanel,
                           ICategoryPanel categoryPanel,
                           IUIStateTracker uiStateTracker,
                           IUICharacterManager uiCharacterManager,
                           ScreenBuffer screenBuffer)
        {
            _formationPanel           = formationPanel;
            _targetPanel              = targetPanel;
            _commandPanel             = commandPanel;
            _actionPanel              = actionPanel;
            _turnOrderPanel           = turnOrderPanel;
            _actionDetailsPanel       = actionDetailsPanel;
            _categoryDetailsPanel     = categoryDetailsPanel;
            _combatLogPanel           = combatLogPanel;
            _characterPanel           = characterPanel;
            _statusEffectsPanel       = statusEffectsPanel;
            _statsDetailsPanel        = statsDetailsPanel;
            _categoryPanel            = categoryPanel;
            _characterPanel.MaxHeight = _formationPanel.MaxHeight;
            _uiStateTracker           = uiStateTracker;
            _uiCharacterManager       = uiCharacterManager;
            _screenBuffer             = screenBuffer;
            _commandPanel.IsActive    = true;

            BindEvents();
        }