public ReverseTime(FiniteTimeAction action) : base(action == null ? 0 : action.Duration) { if (action == null) { throw new ArgumentNullException("action"); } _action = action; }
public Spawn(FiniteTimeAction first, FiniteTimeAction second) : base((first == null || second == null) ? 0 : Math.Max(first.Duration, second.Duration)) { if (first == null) { throw new ArgumentNullException("first"); } if (second == null) { throw new ArgumentNullException("second"); } _first = first; _second = second; if (_first.Duration > _second.Duration) { _second = Sequence.Construct(_second, new DelayTime(_first.Duration - _second.Duration)); } else { _first = Sequence.Construct(_first, new DelayTime(_second.Duration - _first.Duration)); } }
public Repeat(FiniteTimeAction other, int times) : base(other == null ? 0 : other.Duration * times) { if (other == null) { throw new ArgumentNullException("other"); } _times = times; _other = other; _total = 0; }
public Sequence(FiniteTimeAction actionOne, FiniteTimeAction actionTwo) : base(0) { if (actionOne == null) { throw new ArgumentNullException("actionOne"); } if (actionTwo == null) { throw new ArgumentNullException("actionTwo"); } _actions = new FiniteTimeAction[] { actionOne, actionTwo }; Duration = actionOne.Duration + actionTwo.Duration; }