// Dependency injection #if ENABLE_INPUT_SYSTEM //public FluentBuilder UseInputAsset(params string[] stateGroupNames) { //} #endif // Declare a new StateGroup, independent of the state in context. public FluentBuilderStateGroup StateGroup(string name, params string[] states) { if (!m_stateGroups.ContainsKey(name)) { m_stateGroups[name] = m_graph.NewStateGroup(name); } StateGroup sg = m_stateGroups[name]; foreach (string stateName in states) { if (m_states.ContainsKey(stateName)) { m_states[stateName].AddGroup(sg); } else { if (m_waitingStateGroups.ContainsKey(stateName)) { m_waitingStateGroups[stateName].Add(sg); } else { m_waitingStateGroups[stateName] = new List <StateGroup>(5) { sg }; } } } var builder = new FluentBuilderStateGroup(sg, this); return(builder); }
public static StateGroup NewStateGroup(this Graph graph, string name) { var sg = new StateGroup(name); graph.AddGroup(sg); return(sg); }
public void AddGroup(StateGroup sg) { groups.Add(sg); }
public void AddGroup(StateGroup sg) { m_allGroups.Add(sg); }