/// <summary> /// Class constructor. /// <param name="stateTransition">The target transition.</param> /// <param name="destination">The target destination.</param> /// <param name="index">The transition index.</param> /// <param name="blackboard">The state blackboard.</param> /// </summary> public TransitionGUI (StateTransition stateTransition, InternalStateBehaviour destination, int index, InternalBlackboard blackboard) { m_Transition = stateTransition; m_Destination = destination; // It's a global event? if (m_Transition.eventID < 0) { if (InternalGlobalBlackboard.Instance != null) m_FsmEvent = InternalGlobalBlackboard.Instance.GetFsmEvent(m_Transition.eventID); } // It's a local variable and the blackboard is not null? else if (m_Transition.eventID > 0 && blackboard != null) m_FsmEvent = blackboard.GetFsmEvent(m_Transition.eventID); // Get the transition arrow vertical offset m_VerticalOffset = StateGUI.defaultHeight + TransitionGUI.defaultHeight * (index + .35f); }