Exemplo n.º 1
0
        public Hud(IGraphics graphics, IPlayer player, IActiveGear activeGear, SpriteFont fontBig, SpriteFont fontSmall)
        {
            _graphics   = graphics ?? throw new ArgumentNullException(ComponentStrings.Graphics);
            _player     = player ?? throw new ArgumentNullException(ComponentStrings.Player);
            _activeGear = activeGear ?? throw new ArgumentNullException(ComponentStrings.ActiveGear);

            _font    = fontSmall;
            _fontBig = fontBig;
        }
Exemplo n.º 2
0
 public GameManager(
     IGameOptions gameOptions,
     IDebug debug,
     IItemManager itemManager,
     IEntityManager entityManager,
     IHud hud,
     IPlayer player,
     IInventory inventory,
     IActiveGear activeGear
     )
 {
     // components
     _debug         = debug ?? throw new ArgumentNullException(ComponentStrings.Debug);
     _gameOptions   = gameOptions ?? throw new ArgumentNullException(ComponentStrings.GameOptions);
     _hud           = hud ?? throw new ArgumentNullException(ComponentStrings.HUD);
     _inventory     = inventory ?? throw new ArgumentNullException(ComponentStrings.Inventory);
     _itemManager   = itemManager ?? throw new ArgumentNullException(ComponentStrings.ItemManager);
     _entityManager = entityManager ?? throw new ArgumentNullException(ComponentStrings.EntityManager);
     _player        = player ?? throw new ArgumentNullException(ComponentStrings.Player);
     _activeGear    = activeGear ?? throw new ArgumentNullException(ComponentStrings.ActiveGear);
 }