private bool ProcessPathUnit(ref PathUnit unit, byte index, PathPositionProcessor processor)
        {
            if ((unit.m_pathFindFlags & PathUnit.FLAG_READY) == 0)
            {
                return(false);
            }

            switch (index)
            {
            case 0:
                processor(ref unit.m_position00);
                break;

            case 1:
                processor(ref unit.m_position01);
                break;

            case 2:
                processor(ref unit.m_position02);
                break;

            case 3:
                processor(ref unit.m_position03);
                break;

            case 4:
                processor(ref unit.m_position04);
                break;

            case 5:
                processor(ref unit.m_position05);
                break;

            case 6:
                processor(ref unit.m_position06);
                break;

            case 7:
                processor(ref unit.m_position07);
                break;

            case 8:
                processor(ref unit.m_position08);
                break;

            case 9:
                processor(ref unit.m_position09);
                break;

            case 10:
                processor(ref unit.m_position10);
                break;

            case 11:
                processor(ref unit.m_position11);
                break;

            default:
                return(false);
            }
            return(true);
        }
 public bool ProcessCurrentPathPosition(ref Vehicle vehicleData, byte index, PathPositionProcessor processor)
 {
     return(ProcessPathUnit(ref Singleton <PathManager> .instance.m_pathUnits.m_buffer[vehicleData.m_path], index, processor));
 }