Example #1
0
 public TransitionInformation(InstructorContainer _container, int _priority, float _time, int _releasePriority)
 {
     m_Container       = _container;
     m_Priority        = _priority;
     m_Time            = _time;
     m_ReleasePriority = _releasePriority;
 }
Example #2
0
    // ----------------------------------------------------------------------------------------------------
    // Inserts transition in list after its corresponding priority
    // ----------------------------------------------------------------------------------------------------
    private void InsertTransition(InstructorContainer _container, int _priority, float _time, int _priorityRelease)
    {
        int insertionPriority = _priorityRelease != ContainerPriority.None ? _priorityRelease : _priority;

        for (int i = 0; i < m_TransitionCount; i++)
        {
            if (m_Transitions[i].Priority > insertionPriority)
            {
                Assertion.Assert(i < InstructorProcessor.m_TransitionMaxCount - 1, "Transition list is full, cannot insert.");

                for (int j = InstructorProcessor.m_TransitionMaxCount - 1; j > i; j--)
                {
                    m_Transitions[j] = m_Transitions[j - 1];
                }

                InitContainer(_container);
                m_Transitions[i] = new TransitionInformation(_container, _priority, _time, _priorityRelease);
                m_TransitionCount++;

                break;
            }
        }
    }
Example #3
0
 // ----------------------------------------------------------------------------------------------------
 // Inits instructors in the specified transition
 // ----------------------------------------------------------------------------------------------------
 protected void InitContainer(InstructorContainer _container)
 {
     _container.m_Positioner.Init(m_TargetTransform);
     _container.m_Orienter.Init(m_TargetTransform);
 }
Example #4
0
 // ----------------------------------------------------------------------------------------------------
 // Gets the banking from the specified set of instructors (will not actually be implemented
 // in this class)
 // ----------------------------------------------------------------------------------------------------
 protected Vector3 GetBanking(InstructorContainer _container)
 {
     return(Vector3.up);
 }
Example #5
0
 // ----------------------------------------------------------------------------------------------------
 // Gets the orientation from the specified set of instructors
 // ----------------------------------------------------------------------------------------------------
 protected Vector3 GetOrientation(InstructorContainer _container, Vector3 _position)
 {
     return(_container.m_Orienter.GetOrientation(_position));
 }
Example #6
0
 // ----------------------------------------------------------------------------------------------------
 // Gets the collided position from the specified set of instructors (will not actually be implemented
 // in this class)
 // ----------------------------------------------------------------------------------------------------
 protected Vector3 GetCollidedPosition(InstructorContainer _container, Vector3 position)
 {
     return(position);
 }
Example #7
0
 // ----------------------------------------------------------------------------------------------------
 // Gets the position from the specified set of instructors
 // ----------------------------------------------------------------------------------------------------
 protected Vector3 GetPosition(InstructorContainer _container)
 {
     return(_container.m_Positioner.GetPosition());
 }