Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">
        /// A string representing the name of the section.
        /// </param>
        /// <param name="bossPlacement">
        /// The boss placement of this section.
        /// </param>
        /// <param name="prizePlacement">
        /// The prize placement of this section.
        /// </param>
        /// <param name="autoTrackValue">
        /// The section autotrack value.
        /// </param>
        /// <param name="requirement">
        /// The requirement for this section to be visible.
        /// </param>
        /// <param name="alwaysClearable">
        /// A boolean representing whether the section is always clearable (used for GT final).
        /// </param>
        public PrizeSection(
            string name, IBossPlacement bossPlacement, IPrizePlacement prizePlacement,
            IAutoTrackValue?autoTrackValue, IRequirement requirement,
            bool alwaysClearable = false) : base(name, bossPlacement, requirement)
        {
            _alwaysClearable = alwaysClearable;
            _autoTrackValue  = autoTrackValue;
            PrizePlacement   = prizePlacement ??
                               throw new ArgumentNullException(nameof(prizePlacement));

            PropertyChanged += OnPropertyChanged;
            PrizePlacement.PropertyChanging += OnPrizeChanging;
            PrizePlacement.PropertyChanged  += OnPrizeChanged;

            if (_autoTrackValue != null)
            {
                _autoTrackValue.PropertyChanged += OnAutoTrackValueChanged;
            }
        }
Пример #2
0
 /// <summary>
 /// Returns a new change prize action.
 /// </summary>
 /// <param name="prizePlacement">
 /// The prize placement to change.
 /// </param>
 /// <returns>
 /// A new change prize action.
 /// </returns>
 public IUndoable GetChangePrize(IPrizePlacement prizePlacement)
 {
     return(_changePrizeFactory(prizePlacement));
 }
Пример #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="prizePlacement">
 /// The boss section data for the dungeon.
 /// </param>
 public ChangePrize(IPrizePlacement prizePlacement)
 {
     _prizePlacement = prizePlacement;
 }