static public bool IsEventSequenceOccuringThisFrame <T>(this GamepadEventHistory <T> item, ICollection <T> sequence) { if (item.IsEventOccuringThisFrame(h => h.AreCurrentAndPastValuesEqual(sequence))) { return(true); } return(false); }
static public bool IsEventOccuringThisFrame <T>(this GamepadEventHistory <T> item, Predicate <GamepadEventHistory <T> > predicate) { if (item.IsCurrentEventOccuringThisFrame()) { if (predicate(item)) { return(true); } } return(false); }
static public bool AreCurrentAndPastValuesEqual <T>(this GamepadEventHistory <T> item, IEnumerable <T> sequence) { return(item.AreCurrentAndPastValuesEqual(sequence.ToList())); }
static public bool AreCurrentAndPastValuesEqual <T>(this GamepadEventHistory <T> item, params T[] sequence) { return(item.AreCurrentAndPastValuesEqual((ICollection <T>)sequence)); }
static public bool AreCurrentAndPastValuesEqual <T>(this GamepadEventHistory <T> item, ICollection <T> sequence) { return(item.AreCurrentAndPastValues(sequence, (e, o) => e.EqualsEX(o))); }
static public bool AreCurrentAndPastValues <T, J>(this GamepadEventHistory <T> item, IEnumerable <J> sequence, Relation <T, J> relation) { return(item.AreCurrentAndPastValues(sequence.ToList(), relation)); }
static public bool AreCurrentAndPastValues <T, J>(this GamepadEventHistory <T> item, ICollection <J> sequence, Relation <T, J> relation) { return(item.AreCurrentAndPastEvents(sequence, (e, o) => relation(e.GetValue(), o))); }
static public bool AreCurrentAndPastEvents <T, J>(this GamepadEventHistory <T> item, ICollection <J> sequence, Relation <GamepadEvent <T>, J> relation) { return(item.GetCurrentAndPastEvents(sequence.Count) .AreElements(sequence, relation)); }
static public bool IsStickGestureOccuringThisFrame(this GamepadEventHistory <GamepadStickZone> item, GamepadStickGesture gesture) { return(item.IsEventSequenceOccuringThisFrame(gesture.GetStickZones())); }
static public IEnumerable <GamepadEvent <T> > GetCurrentAndPastEvents <T>(this GamepadEventHistory <T> item, int count) { return(item.GetPastEvents(count - 1).Append(item.GetCurrentEvent())); }
static public GamepadEvent <T> GetPreviousEvent <T>(this GamepadEventHistory <T> item) { return(item.GetPastEvents(1).GetFirst()); }
static public IEnumerable <T> GetCurrentAndPastValues <T>(this GamepadEventHistory <T> item, int count) { return(item.GetCurrentAndPastEvents(count).Convert(e => e.GetValue())); }
static public T GetPreviousValue <T>(this GamepadEventHistory <T> item) { return(item.GetPreviousEvent().IfNotNull(e => e.GetValue())); }
static public bool IsEventSequenceOccuringThisFrame <T>(this GamepadEventHistory <T> item, IEnumerable <T> sequence) { return(item.IsEventSequenceOccuringThisFrame(sequence.ToList())); }
static public bool IsEventSequenceOccuringThisFrame <T>(this GamepadEventHistory <T> item, params T[] sequence) { return(item.IsEventSequenceOccuringThisFrame((ICollection <T>)sequence)); }
static public bool IsCurrentEventOccuringThisFrame <T>(this GamepadEventHistory <T> item) { return(item.GetCurrentEvent().IfNotNull(e => e.IsOccuringThisFrame())); }