private void AddHistoryItem(List<ElementBase> elementsBefore, List<ElementBase> elementsAfter, ActionType actionType)
		{
			var historyItem = new HistoryItem()
			{
				ActionType = actionType
			};

			foreach (var elementBase in elementsBefore)
				historyItem.ElementsBefore.Add(elementBase.Clone());

			foreach (var elementBase in elementsAfter)
				historyItem.ElementsAfter.Add(elementBase.Clone());

			if (_historyItems.Count > _offset)
				_historyItems.RemoveRange(_offset, _historyItems.Count - _offset);
			_historyItems.Add(historyItem);
			_offset = _historyItems.Count;
		}
        void AddHistoryItem(List<ElementBase> elementsBefore, List<ElementBase> elementsAfter, ActionType actionType)
        {
            var historyItem = new HistoryItem()
            {
                ActionType = actionType
            };

            foreach (var elementBase in elementsBefore)
                historyItem.ElementsBefore.Add(elementBase.Clone());

            foreach (var elementBase in elementsAfter)
                historyItem.ElementsAfter.Add(elementBase.Clone());

            if (HistoryItems.Count > Offset)
                HistoryItems.RemoveRange(Offset, HistoryItems.Count - Offset);
            HistoryItems.Add(historyItem);
            Offset = HistoryItems.Count;
        }
Exemple #3
0
 public AnimatedTexture GetAnimation(ActionType type)
 {
   if (this.HideFez && !this.GameState.SaveData.IsNewGamePlus && this.NoHatAnimations.ContainsKey(type))
     return this.NoHatAnimations[type];
   else
     return this.HatAnimations[type];
 }