public void StartListening(GraphStack stack) { stack.GetGraphData <FlowGraphData>().isListening = true; foreach (var unit in units) { (unit as IGraphEventListener)?.StartListening(stack); } }
public void StopListening(GraphStack stack) { foreach (var unit in units) { (unit as IGraphEventListener)?.StopListening(stack); } stack.GetGraphData <FlowGraphData>().isListening = false; }
public void StopListening(GraphStack stack) { var activeStates = GetActiveStatesNoAlloc(stack); foreach (var state in activeStates) { (state as IGraphEventListener)?.StopListening(stack); } activeStates.Free(); stack.GetGraphData <StateGraphData>().isListening = false; }