public bool IsListening(GraphPointer pointer) { if (!pointer.hasData) { return(false); } return(pointer.GetElementData <Data>(this).isListening); }
// Active state detection happens twice: // // 1. Before the enumeration, because any state // that becomes active during an update shouldn't // be updated until the next update // // 2. Inside the update method, because a state // that was active during enumeration and no longer // is shouldn't be updated. private HashSet <IState> GetActiveStatesNoAlloc(GraphPointer pointer) { var activeStates = HashSetPool <IState> .New(); foreach (var state in states) { var stateData = pointer.GetElementData <State.Data>(state); if (stateData.isActive) { activeStates.Add(state); } } return(activeStates); }
public bool IsListening(GraphPointer pointer) { return(pointer.GetElementData <Data>(this).isListening); }
public bool IsListening(GraphPointer pointer) { return(pointer.GetElementData <State.Data>(source).isActive); }