public void Initialize(NavStateContext context, NavState parent) { m_context = context; m_state = parent; Initialize(); }
public void Initialize(NavStateMachine rootStateMachine, NavStateContext context) { Context = context; m_root = rootStateMachine; m_root.Initialize(Context, m_root); Navigator.Initialize(context, m_root); }
/// <summary> /// Called by the manager when the state machine hierarchy is initializing /// </summary> public override void Initialize(NavStateContext context, NavStateMachine stateMachine) { base.Initialize(context, stateMachine); NavState[] states = NavStateUtils.GetChildren(this); foreach (var state in states) { state.Initialize(m_context, this); } }
public void Initialize(NavStateContext context, NavStateMachine rootStateMachine) { m_context = context; Root = rootStateMachine; // Create a Navigation Plan to enter the root state initially m_navigationPlan.Reset(); m_navigationPlan.AddStateToEnter(rootStateMachine); // Check if the destination is a parent state, and repeatedly add the default state until we get to a leaf state. AddDefaultStatesToEnter(rootStateMachine); m_navigationPlan.NavigationStarted(); BeginLoadingState(Root); }