コード例 #1
0
    public void DisplayNodes(int index, ODODDQQO soi, GameObject sso_go)

    {
        so_go = sso_go;
        List <Vector2> tmpNodes = new List <Vector2>();

        if (soi != null)
        {
            tmpNodes.AddRange(soi.nodeList);
        }

        if (so_go != null && tmpNodes.Count == 0)
        {
            List <Vector2> arr = ODDDDCDOCC.ODDDCCCQQQ(2, so_go, OQDOOCCDDD.traceOffset);
            if (arr != null)
            {
                if (arr.Count > 1)
                {
                    tmpNodes = arr;
                }
            }
        }
        bool clamped = false;

        so         = soi;
        sideObject = index;
        if (so_editor == null)
        {
            try{
                so_editor = new ODDDDCDOCC(position, tmpNodes, clamped);
            }catch {
            }
        }



        if (so_editor.OODDDQCOCC.Count > 0)
        {
            if ((Vector2)so_editor.OODDDQCOCC[0] == (Vector2)so_editor.OODDDQCOCC[so_editor.OODDDQCOCC.Count - 1])
            {
                so_editor.closed = true;
                so_editor.OODDDQCOCC.RemoveAt(so_editor.OODDDQCOCC.Count - 1);
            }
        }
        if (tmpNodes.Count != 0)
        {
            Rect rect = new Rect(stageSelectionGridWidth, 0, Screen.width - stageSelectionGridWidth, Screen.height);
            so_editor.FrameSelected(rect);
        }
        OQDOOCCDDD.ODDODOCQCC(index, soi, sso_go, so_editor);
        return;
    }
コード例 #2
0
ファイル: SideObjectImporter.cs プロジェクト: KeriN0s/Arazi
 public static String CheckName(String sideobjectname)
 {
     for (int i = 0; i < OOCQCOCDOQ.ODCOQOCDCD.Count; i++)
     {
         ODODDQQO so = (ODODDQQO)OOCQCOCDOQ.ODCOQOCDCD[i];
         if (so.name == sideobjectname)
         {
             sideobjectname = sideobjectname + "1";
             sideobjectname = CheckName(sideobjectname);
         }
     }
     return(sideobjectname);
 }
コード例 #3
0
 public static String CheckName(String sideobjectname)
 {
     for (int i = 0; i < ODOCDDOOCC.OODDOQQOQC.Count; i++)
     {
         ODODDQQO so = (ODODDQQO)ODOCDDOOCC.OODDOQQOQC[i];
         if (so.name == sideobjectname)
         {
             sideobjectname = sideobjectname + "1";
             sideobjectname = CheckName(sideobjectname);
         }
     }
     return(sideobjectname);
 }
コード例 #4
0
 public static String CheckName(String sideobjectname)
 {
     for (int i = 0; i < ODQDQQOODQ.OQDDCQCQQO.Count; i++)
     {
         ODODDQQO so = (ODODDQQO)ODQDQQOODQ.OQDDCQCQQO[i];
         if (so.name == sideobjectname)
         {
             sideobjectname = sideobjectname + "1";
             sideobjectname = CheckName(sideobjectname);
         }
     }
     return(sideobjectname);
 }
コード例 #5
0
    static public Transform ODDQDODCCQ(RoadObjectScript target)
    {
        GameObject go = new GameObject("Side Objects");

        go.transform.parent = target.transform;
        List <ODODDQQO> arr = OCOQDQCQDO.OOOCODQOOQ(false);

        for (int i = 0; i < target.OOQQQOQO.Length; i++)
        {
            ODODDQQO so = (ODODDQQO)arr[target.OOQQQOQO[i]];
            OQDQQDODCD(so.name, go.transform, so, target.OOQQQOQO[i], target);
        }
        return(go.transform);
    }
コード例 #6
0
    static public void OQODOCQQCO(OOCOOCQQDQ OQQCDCOCQO, Transform obj, List <SideObjectParams> param, bool OOQDOOQQ, int[] activeODODDQQO, float raise, RoadObjectScript target, Transform mySideObject)
    {
        List <OCQODDOCQD> pnts = target.OQQCDCOCQO.ODDODQOCQO;
        List <ODODDQQO>   arr  = OCOQDQCQDO.OOOCODQOOQ(false);

        for (int i = 0; i < activeODODDQQO.Length; i++)
        {
            ODODDQQO so = (ODODDQQO)arr[activeODODDQQO[i]];

            GameObject goi = null;
            if (so.OCDDCOQDOD != "")
            {
                goi = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.OCDDCOQDOD), typeof(GameObject));
            }
            GameObject ODQDDDDCQD = null;
            if (so.OQCCDQOCQQ != "")
            {
                ODQDDDDCQD = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.OQCCDQOCQQ), typeof(GameObject));
            }
            GameObject OQQDQOOCQO = null;
            if (so.OOQODOQQDC != "")
            {
                OQQDQOOCQO = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.OOQODOQQDC), typeof(GameObject));
            }
            OCOQDQCQDO.OOCDCQCCCO(so, pnts, obj, OQQCDCOCQO, param, OOQDOOQQ, activeODODDQQO[i], raise, goi, ODQDDDDCQD, OQQDQOOCQO);
            if (so.terrainTree > 0)
            {
                if (EditorUtility.DisplayDialog("Side Objects", "Side Object " + so.name + " in " + target.gameObject.name + " includes an asset part of the terrain vegetation data.\n\nWould you like to add this side object to the terrain vegetation data?", "yes", "no"))
                {
                    foreach (Transform child in mySideObject)
                    {
                        if (child.gameObject.name == so.name)
                        {
                            OCOQDQCQDO.OOQQCDCODQ(activeODODDQQO[i], child);
                            MonoBehaviour.DestroyImmediate(child.gameObject);
                            break;
                        }
                    }
                }
            }
            foreach (Transform child in mySideObject)
            {
                if (child.gameObject.GetComponent(typeof(sideObjectScript)) != null)
                {
                    MonoBehaviour.DestroyImmediate(child.gameObject.GetComponent(typeof(sideObjectScript)));
                }
            }
        }
    }
コード例 #7
0
public void DisplayNodes (int index, ODODDQQO soi, GameObject sso_go)

{
so_go = sso_go;
List<Vector2> tmpNodes = new List<Vector2>();
if(soi != null) tmpNodes.AddRange(soi.nodeList);

if(so_go != null && tmpNodes.Count == 0){

List<Vector2> arr = ODQQQCQQOD.OCCOCQCDDD(2, so_go, OODCCQQQCC.traceOffset);
if(arr != null){
if(arr.Count > 1){
tmpNodes = arr;
}
}
}
bool clamped = false;
so = soi;
sideObject = index;
if (so_editor == null){
try{
so_editor = new ODQQQCQQOD(position, tmpNodes, clamped);
}catch{
}
}



if(so_editor.ODQCCCQDDQ.Count > 0){
if((Vector2)so_editor.ODQCCCQDDQ[0] == (Vector2)so_editor.ODQCCCQDDQ[so_editor.ODQCCCQDDQ.Count - 1]){

so_editor.closed = true;
so_editor.ODQCCCQDDQ.RemoveAt(so_editor.ODQCCCQDDQ.Count - 1);
}
}
if(tmpNodes.Count != 0){
Rect rect = new Rect(stageSelectionGridWidth, 0, Screen.width - stageSelectionGridWidth, Screen.height);
so_editor.FrameSelected(rect);
}
OODCCQQQCC.OCOCOODCCQ(index, soi, sso_go, so_editor);
return;
}
コード例 #8
0
    static public void OOOQDQCCDQ(sideObjectScript scr, int index, RoadObjectScript target, Transform go)
    {
        string    n = go.gameObject.name;
        Transform p = go.parent;

        if (go != null)
        {
            MonoBehaviour.DestroyImmediate(go.gameObject);
        }
        List <ODODDQQO> arr = OCOQDQCQDO.OOOCODQOOQ(false);
        ODODDQQO        so  = (ODODDQQO)arr[index];

        OQDQQDODCD(n, p, so, index, target);

        GameObject goi = null;

        if (so.OCDDCOQDOD != "")
        {
            goi = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.OCDDCOQDOD), typeof(GameObject));
        }
        GameObject ODQDDDDCQD = null;

        if (so.OQCCDQOCQQ != "")
        {
            ODQDDDDCQD = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.OQCCDQOCQQ), typeof(GameObject));
        }
        GameObject OQQDQOOCQO = null;

        if (so.OOQODOQQDC != "")
        {
            OQQDQOOCQO = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.OOQODOQQDC), typeof(GameObject));
        }

        OCOQDQCQDO.OOODCQDOQO(target.OQQCDCOCQO, target.transform, target.OQOOQQDCQC(), target.OOQDOOQQ, index, target.raise, goi, ODQDDDDCQD, OQQDQOOCQO);
        arr = null;
    }
コード例 #9
0
    static public void OQDQQDODCD(string objectname, Transform obj, ODODDQQO so, int index, RoadObjectScript target)
    {
        Transform rootObject = null;

        foreach (Transform child1 in obj)
        {
            if (child1.name == objectname)
            {
                rootObject = child1;

                if (so.textureGUID != "")
                {
                    MeshRenderer mr  = (MeshRenderer)rootObject.transform.GetComponent(typeof(MeshRenderer));
                    Material     mat = (Material)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.textureGUID), typeof(Material));
                    mr.material = mat;
                }
            }
        }
        if (rootObject == null)
        {
            GameObject go = new GameObject(objectname);
            go.name             = objectname;
            go.transform.parent = obj;
            rootObject          = go.transform;

            go.AddComponent(typeof(MeshFilter));
            go.AddComponent(typeof(MeshRenderer));
            go.AddComponent(typeof(MeshCollider));
            go.AddComponent(typeof(sideObjectScript));
            sideObjectScript scr = (sideObjectScript)go.GetComponent(typeof(sideObjectScript));
            if (so.textureGUID != "")
            {
                MeshRenderer mr  = (MeshRenderer)go.GetComponent(typeof(MeshRenderer));
                Material     mat = (Material)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.textureGUID), typeof(Material));
                mr.material = mat;
                scr.mat     = mat;
            }
            scr.soIndex = index;
            scr.soName  = so.name;

            scr.soAlign    = int.Parse(so.align);
            scr.soUVx      = so.uvx;
            scr.soUVy      = so.uvy;
            scr.m_distance = so.m_distance;
            scr.objectType = so.objectType;
            scr.weld       = so.weld;
            scr.combine    = so.combine;
            scr.OODCQOQDDC = so.OODCQOQDDC;
            scr.m_go       = so.OCDDCOQDOD;
            if (so.OQCCDQOCQQ != "")
            {
                scr.OQCCDQOCQQ = so.OQCCDQOCQQ;
            }
            if (so.OQCCDQOCQQ != "")
            {
                scr.OOQODOQQDC = so.OOQODOQQDC;
            }
            scr.selectedRotation = so.selectedRotation;
            scr.position         = so.position;
            scr.uvInt            = so.uvType;
            scr.randomObjects    = so.randomObjects;
            scr.childOrder       = so.childOrder;
            scr.sidewaysOffset   = so.sidewaysOffset;
            scr.density          = so.density;
            scr.OOOOOCQOCO       = target;
            scr.terrainTree      = so.terrainTree;
            scr.xPosition        = so.xPosition;
            scr.yPosition        = so.yPosition;
            scr.uvYRound         = so.uvYRound;
            scr.m_collider       = so.collider;
            scr.m_tangents       = so.tangents;
        }
    }
コード例 #10
0
    // Token: 0x060048AA RID: 18602 RVA: 0x001139B4 File Offset: 0x00111BB4
    public void OOOOOOODCD(ArrayList arr, string[] DOODQOQO, string[] OODDQOQO)
    {
        bool flag = false;

        global::RoadObjectScript.ODODOQQO = DOODQOQO;
        global::RoadObjectScript.ODODQOOQ = OODDQOQO;
        ArrayList arrayList = new ArrayList();

        if (this.obj == null)
        {
            this.ODOCOQCCOC(base.transform, null, null, null);
        }
        foreach (object obj in this.obj)
        {
            Transform transform = (Transform)obj;
            if (transform.name == "Markers")
            {
                foreach (object obj2 in transform)
                {
                    Transform            transform2 = (Transform)obj2;
                    global::MarkerScript component  = transform2.GetComponent <global::MarkerScript>();
                    component.OQODQQDO.Clear();
                    component.ODOQQQDO.Clear();
                    component.OQQODQQOO.Clear();
                    component.ODDOQQOO.Clear();
                    arrayList.Add(component);
                }
            }
        }
        this.mSc = (global::MarkerScript[])arrayList.ToArray(typeof(global::MarkerScript));
        ArrayList arrayList2 = new ArrayList();
        int       num        = 0;
        int       num2       = 0;

        if (this.ODQQQQQO != null)
        {
            if (arr.Count == 0)
            {
                return;
            }
            for (int i = 0; i < global::RoadObjectScript.ODODOQQO.Length; i++)
            {
                ODODDQQO ododdqqo = (ODODDQQO)arr[i];
                for (int j = 0; j < this.ODQQQQQO.Length; j++)
                {
                    if (global::RoadObjectScript.ODODOQQO[i] == this.ODQQQQQO[j])
                    {
                        num++;
                        if (this.ODODQQOD.Length > j)
                        {
                            arrayList2.Add(this.ODODQQOD[j]);
                        }
                        else
                        {
                            arrayList2.Add(false);
                        }
                        foreach (global::MarkerScript markerScript in this.mSc)
                        {
                            int num3 = -1;
                            for (int l = 0; l < markerScript.ODDOOQDO.Length; l++)
                            {
                                if (ododdqqo.id == markerScript.ODDOOQDO[l])
                                {
                                    num3 = l;
                                    break;
                                }
                            }
                            if (num3 >= 0)
                            {
                                markerScript.OQODQQDO.Add(markerScript.ODDOOQDO[num3]);
                                markerScript.ODOQQQDO.Add(markerScript.ODDGDOOO[num3]);
                                markerScript.OQQODQQOO.Add(markerScript.ODDQOOO[num3]);
                                if (ododdqqo.sidewaysDistanceUpdate == 0 || (ododdqqo.sidewaysDistanceUpdate == 2 && markerScript.ODDQOODO[num3] != ododdqqo.oldSidwaysDistance))
                                {
                                    markerScript.ODDOQQOO.Add(markerScript.ODDQOODO[num3]);
                                }
                                else
                                {
                                    markerScript.ODDOQQOO.Add(ododdqqo.splinePosition);
                                }
                            }
                            else
                            {
                                markerScript.OQODQQDO.Add(ododdqqo.id);
                                markerScript.ODOQQQDO.Add(ododdqqo.markerActive);
                                markerScript.OQQODQQOO.Add(true);
                                markerScript.ODDOQQOO.Add(ododdqqo.splinePosition);
                            }
                        }
                    }
                }
                if (ododdqqo.sidewaysDistanceUpdate != 0)
                {
                }
                flag = false;
            }
        }
        for (int m = 0; m < global::RoadObjectScript.ODODOQQO.Length; m++)
        {
            ODODDQQO ododdqqo2 = (ODODDQQO)arr[m];
            bool     flag2     = false;
            for (int n = 0; n < this.ODQQQQQO.Length; n++)
            {
                if (global::RoadObjectScript.ODODOQQO[m] == this.ODQQQQQO[n])
                {
                    flag2 = true;
                }
            }
            if (!flag2)
            {
                num2++;
                arrayList2.Add(false);
                foreach (global::MarkerScript markerScript2 in this.mSc)
                {
                    markerScript2.OQODQQDO.Add(ododdqqo2.id);
                    markerScript2.ODOQQQDO.Add(ododdqqo2.markerActive);
                    markerScript2.OQQODQQOO.Add(true);
                    markerScript2.ODDOQQOO.Add(ododdqqo2.splinePosition);
                }
            }
        }
        this.ODODQQOD = (bool[])arrayList2.ToArray(typeof(bool));
        this.ODQQQQQO = new string[global::RoadObjectScript.ODODOQQO.Length];
        global::RoadObjectScript.ODODOQQO.CopyTo(this.ODQQQQQO, 0);
        ArrayList arrayList3 = new ArrayList();

        for (int num5 = 0; num5 < this.ODODQQOD.Length; num5++)
        {
            if (this.ODODQQOD[num5])
            {
                arrayList3.Add(num5);
            }
        }
        this.OOQQQOQO = (int[])arrayList3.ToArray(typeof(int));
        foreach (global::MarkerScript markerScript3 in this.mSc)
        {
            markerScript3.ODDOOQDO = (string[])markerScript3.OQODQQDO.ToArray(typeof(string));
            markerScript3.ODDGDOOO = (bool[])markerScript3.ODOQQQDO.ToArray(typeof(bool));
            markerScript3.ODDQOOO  = (bool[])markerScript3.OQQODQQOO.ToArray(typeof(bool));
            markerScript3.ODDQOODO = (float[])markerScript3.ODDOQQOO.ToArray(typeof(float));
        }
        if (flag)
        {
        }
    }
コード例 #11
0
    public static void OQDQQDODCD(string objectname, Transform obj, ODODDQQO so, int index, RoadObjectScript target)
    {
        Transform rootObject = null;

        foreach(Transform child1 in obj)
        {
        if(child1.name == objectname){
        rootObject = child1;

        if(so.textureGUID !=""){
        MeshRenderer mr  = (MeshRenderer)rootObject.transform.GetComponent(typeof(MeshRenderer));
        Material mat =  (Material)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.textureGUID), typeof(Material));
        mr.material = mat;

        }
        }
        }
        if(rootObject == null){
        GameObject go  =  new GameObject(objectname);
        go.name = objectname;
        go.transform.parent = obj;
        rootObject = go.transform;

        go.AddComponent(typeof(MeshFilter));
        go.AddComponent(typeof(MeshRenderer));
        go.AddComponent(typeof(MeshCollider));
        go.AddComponent(typeof(sideObjectScript));
        sideObjectScript scr = (sideObjectScript)go.GetComponent(typeof(sideObjectScript));
        if(so.textureGUID !=""){
        MeshRenderer mr = (MeshRenderer)go.GetComponent(typeof(MeshRenderer));
        Material mat =  (Material)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.textureGUID), typeof(Material));
        mr.material = mat;
        scr.mat = mat;
        }
        scr.soIndex = index;
        scr.soName = so.name;

        scr.soAlign = int.Parse(so.align);
        scr.soUVx = so.uvx;
        scr.soUVy = so.uvy;
        scr.m_distance = so.m_distance;
        scr.objectType = so.objectType;
        scr.weld = so.weld;
        scr.combine = so.combine;
        scr.OODCQOQDDC = so.OODCQOQDDC;
        scr.m_go = so.OCDDCOQDOD;
        if(so.OQCCDQOCQQ != ""){
        scr.OQCCDQOCQQ = so.OQCCDQOCQQ;

        }
        if(so.OQCCDQOCQQ != ""){
        scr.OOQODOQQDC = so.OOQODOQQDC;

        }
        scr.selectedRotation = so.selectedRotation;
        scr.position = so.position;
        scr.uvInt = so.uvType;
        scr.randomObjects = so.randomObjects;
        scr.childOrder = so.childOrder;
        scr.sidewaysOffset = so.sidewaysOffset;
        scr.density = so.density;
        scr.OOOOOCQOCO = target;
        scr.terrainTree = so.terrainTree;
        scr.xPosition = so.xPosition;
        scr.yPosition = so.yPosition;
        scr.uvYRound = so.uvYRound;
        scr.m_collider = so.collider;
        scr.m_tangents = so.tangents;

        }
    }
コード例 #12
0
ファイル: ObjectManager.cs プロジェクト: wuzhengabc/SDAU
    public void OnGUI()
    {
        if (OOOQODCODO.extensionPath == "")
        {
            OOOQODCODO.extensionPath = GetExtensionPath();
        }
        strArr     = null;
        sosArr     = null;
        returnType = 0;
        ODQDQQOODQ.ODQQDDOQDD(ref strVar, ref intVar, ref goVar, ref soVar, ref strArr, ref sosArr, ref returnType);


        if (returnType == 2)
        {
            ProceduralObjectsEditor editor = null;
            if (ProceduralObjectsEditor.instance == null)
            {
                editor = (ProceduralObjectsEditor)ScriptableObject.CreateInstance(typeof(ProceduralObjectsEditor));
            }
            else
            {
                editor = ProceduralObjectsEditor.instance;
            }
            editor.position = new Rect(editor.position.x, editor.position.y, 500, 400);

            editor.title = strVar;



            ODODDQQO so = soVar;


            editor.DisplayNodes(intVar, so, goVar);
            editor.Show();
        }
        else if (returnType == 4)
        {
            List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false);
            RoadObjectScript.ODODOQQO = ODDQQCODQO.ODQQOCCOQC(arr);
            RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript));
            foreach (RoadObjectScript scr in scripts)
            {
                scr.OOQQQCODCQ(arr, ODDQQCODQO.ODQQOCCOQC(arr), ODDQQCODQO.OCQCOCOODD(arr));
            }
            if (ProceduralObjectsEditor.instance != null)
            {
                ProceduralObjectsEditor.instance.Close();
            }
            instance.Close();
        }
        else if (returnType == 1)
        {
            SideObjectImporter ieditor = (SideObjectImporter)ScriptableObject.CreateInstance(typeof(SideObjectImporter));
            SideObjectImporter.sideobjects = strArr;
            SideObjectImporter.flags       = new bool[intVar];

            SideObjectImporter.importedSos = sosArr;
            ieditor.ShowUtility();
        }
        else if (returnType == 3)
        {
            List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false);
            RoadObjectScript.ODODOQQO = ODDQQCODQO.ODQQOCCOQC(arr);
            RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript));
            foreach (RoadObjectScript scr in scripts)
            {
                List <ODODDQQO> arr1 = ODDQQCODQO.OOQDQCCQDQ(false);
                if (scr.OOCQCQDOQO == null)
                {
                    scr.OCDCQQQCCQ(arr1, ODDQQCODQO.ODQQOCCOQC(arr1), ODDQQCODQO.OCQCOCOODD(arr1));
                }
                scr.OOQQQCODCQ(arr1, ODDQQCODQO.ODQQOCCOQC(arr1), ODDQQCODQO.OCQCOCOODD(arr1));
                if (scr.ODQDCQQQDO == true || scr.objectType == 2)
                {
                    GameObject go = GameObject.Find(scr.gameObject.name + "/Side Objects/" + strVar);

                    if (go != null)
                    {
                        OOCCODOCQQ.OQOQQDQOQQ((sideObjectScript)go.GetComponent(typeof(sideObjectScript)), intVar, scr, go.transform);
                    }
                }
            }
        }
    }
コード例 #13
0
public static bool CheckExists(ODODDQQO so){
return false;
}
コード例 #14
0
    public void OOOOOOODCD(ArrayList arr, string[] DOODQOQO, string[] OODDQOQO)
    {
        bool flag = false;

        ODODOQQO = DOODQOQO;
        ODODQOOQ = OODDQOQO;
        ArrayList list = new ArrayList();

        if (this.obj == null)
        {
            this.ODOCOQCCOC(base.transform, null, null, null);
        }
        IEnumerator enumerator = this.obj.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                Transform current = (Transform)enumerator.Current;
                if (current.name == "Markers")
                {
                    IEnumerator enumerator2 = current.GetEnumerator();
                    try
                    {
                        while (enumerator2.MoveNext())
                        {
                            MarkerScript component = ((Transform)enumerator2.Current).GetComponent <MarkerScript>();
                            component.OQODQQDO.Clear();
                            component.ODOQQQDO.Clear();
                            component.OQQODQQOO.Clear();
                            component.ODDOQQOO.Clear();
                            list.Add(component);
                        }
                        continue;
                    }
                    finally
                    {
                        IDisposable disposable = enumerator2 as IDisposable;
                        if (disposable == null)
                        {
                        }
                        disposable.Dispose();
                    }
                }
            }
        }
        finally
        {
            IDisposable disposable2 = enumerator as IDisposable;
            if (disposable2 == null)
            {
            }
            disposable2.Dispose();
        }
        this.mSc = (MarkerScript[])list.ToArray(typeof(MarkerScript));
        ArrayList list2 = new ArrayList();
        int       num   = 0;
        int       num2  = 0;

        if (this.ODQQQQQO != null)
        {
            if (arr.Count == 0)
            {
                return;
            }
            for (int k = 0; k < ODODOQQO.Length; k++)
            {
                ODODDQQO ododdqqo = (ODODDQQO)arr[k];
                for (int m = 0; m < this.ODQQQQQO.Length; m++)
                {
                    if (ODODOQQO[k] == this.ODQQQQQO[m])
                    {
                        num++;
                        if (this.ODODQQOD.Length > m)
                        {
                            list2.Add(this.ODODQQOD[m]);
                        }
                        else
                        {
                            list2.Add(false);
                        }
                        foreach (MarkerScript script2 in this.mSc)
                        {
                            int index = -1;
                            for (int n = 0; n < script2.ODDOOQDO.Length; n++)
                            {
                                if (ododdqqo.id == script2.ODDOOQDO[n])
                                {
                                    index = n;
                                    break;
                                }
                            }
                            if (index >= 0)
                            {
                                script2.OQODQQDO.Add(script2.ODDOOQDO[index]);
                                script2.ODOQQQDO.Add(script2.ODDGDOOO[index]);
                                script2.OQQODQQOO.Add(script2.ODDQOOO[index]);
                                if ((ododdqqo.sidewaysDistanceUpdate == 0) || ((ododdqqo.sidewaysDistanceUpdate == 2) && (script2.ODDQOODO[index] != ododdqqo.oldSidwaysDistance)))
                                {
                                    script2.ODDOQQOO.Add(script2.ODDQOODO[index]);
                                }
                                else
                                {
                                    script2.ODDOQQOO.Add(ododdqqo.splinePosition);
                                }
                            }
                            else
                            {
                                script2.OQODQQDO.Add(ododdqqo.id);
                                script2.ODOQQQDO.Add(ododdqqo.markerActive);
                                script2.OQQODQQOO.Add(true);
                                script2.ODDOQQOO.Add(ododdqqo.splinePosition);
                            }
                        }
                    }
                }
                if (ododdqqo.sidewaysDistanceUpdate != 0)
                {
                }
                flag = false;
            }
        }
        for (int i = 0; i < ODODOQQO.Length; i++)
        {
            ODODDQQO ododdqqo2 = (ODODDQQO)arr[i];
            bool     flag2     = false;
            for (int num9 = 0; num9 < this.ODQQQQQO.Length; num9++)
            {
                if (ODODOQQO[i] == this.ODQQQQQO[num9])
                {
                    flag2 = true;
                }
            }
            if (!flag2)
            {
                num2++;
                list2.Add(false);
                foreach (MarkerScript script3 in this.mSc)
                {
                    script3.OQODQQDO.Add(ododdqqo2.id);
                    script3.ODOQQQDO.Add(ododdqqo2.markerActive);
                    script3.OQQODQQOO.Add(true);
                    script3.ODDOQQOO.Add(ododdqqo2.splinePosition);
                }
            }
        }
        this.ODODQQOD = (bool[])list2.ToArray(typeof(bool));
        this.ODQQQQQO = new string[ODODOQQO.Length];
        ODODOQQO.CopyTo(this.ODQQQQQO, 0);
        ArrayList list3 = new ArrayList();

        for (int j = 0; j < this.ODODQQOD.Length; j++)
        {
            if (this.ODODQQOD[j])
            {
                list3.Add(j);
            }
        }
        this.OOQQQOQO = (int[])list3.ToArray(typeof(int));
        foreach (MarkerScript script4 in this.mSc)
        {
            script4.ODDOOQDO = (string[])script4.OQODQQDO.ToArray(typeof(string));
            script4.ODDGDOOO = (bool[])script4.ODOQQQDO.ToArray(typeof(bool));
            script4.ODDQOOO  = (bool[])script4.OQQODQQOO.ToArray(typeof(bool));
            script4.ODDQOODO = (float[])script4.ODDOQQOO.ToArray(typeof(float));
        }
        if (!flag)
        {
        }
    }
コード例 #15
0
ファイル: SideObjectImporter.cs プロジェクト: KeriN0s/Arazi
 public static bool CheckExists(ODODDQQO so)
 {
     return(false);
 }
コード例 #16
0
    public void OOQQQCODCQ(List <ODODDQQO> arr, String[] DOODQOQO, String[] OODDQOQO)
    {
        bool saveSOs = false;

        ODODOQQO = DOODQOQO;
        ODODQOOQ = OODDQOQO;



        List <MarkerScript> markerArray = new List <MarkerScript>();

        if (obj == null)
        {
            OQOQCQOOOQ(transform, null, null, null);
        }
        foreach (Transform child  in obj)
        {
            if (child.name == "Markers")
            {
                foreach (Transform marker  in child)
                {
                    MarkerScript markerScript = marker.GetComponent <MarkerScript>();
                    markerScript.OQODQQDO.Clear();
                    markerScript.ODOQQQDO.Clear();
                    markerScript.OQQODQQOO.Clear();
                    markerScript.ODDOQQOO.Clear();
                    markerArray.Add(markerScript);
                }
            }
        }
        mSc = markerArray.ToArray();



        List <bool> arBools = new List <bool>();



        int counter1 = 0;
        int counter2 = 0;

        if (ODQQQQQO != null)
        {
            if (arr.Count == 0)
            {
                return;
            }



            for (int i = 0; i < ODODOQQO.Length; i++)
            {
                ODODDQQO so = (ODODDQQO)arr[i];

                for (int j = 0; j < ODQQQQQO.Length; j++)
                {
                    if (ODODOQQO[i] == ODQQQQQO[j])
                    {
                        counter1++;


                        if (ODODQQOD.Length > j)
                        {
                            arBools.Add(ODODQQOD[j]);
                        }
                        else
                        {
                            arBools.Add(false);
                        }

                        foreach (MarkerScript scr  in mSc)
                        {
                            int l = -1;
                            for (int k = 0; k < scr.ODDOOQDO.Length; k++)
                            {
                                if (so.id == scr.ODDOOQDO[k])
                                {
                                    l = k;
                                    break;
                                }
                            }
                            if (l >= 0)
                            {
                                scr.OQODQQDO.Add(scr.ODDOOQDO[l]);
                                scr.ODOQQQDO.Add(scr.ODDGDOOO[l]);
                                scr.OQQODQQOO.Add(scr.ODDQOOO[l]);

                                if (so.sidewaysDistanceUpdate == 0 || (so.sidewaysDistanceUpdate == 2 && (float)scr.ODDQOODO[l] != so.oldSidwaysDistance))
                                {
                                    scr.ODDOQQOO.Add(scr.ODDQOODO[l]);
                                }
                                else
                                {
                                    scr.ODDOQQOO.Add(so.splinePosition);
                                }
                            }
                            else
                            {
                                scr.OQODQQDO.Add(so.id);
                                scr.ODOQQQDO.Add(so.markerActive);
                                scr.OQQODQQOO.Add(true);
                                scr.ODDOQQOO.Add(so.splinePosition);
                            }
                        }
                    }
                }
                if (so.sidewaysDistanceUpdate != 0)
                {
                }
                saveSOs = false;
            }
        }


        for (int i = 0; i < ODODOQQO.Length; i++)
        {
            ODODDQQO so   = (ODODDQQO)arr[i];
            bool     flag = false;
            for (int j = 0; j < ODQQQQQO.Length; j++)
            {
                if (ODODOQQO[i] == ODQQQQQO[j])
                {
                    flag = true;
                }
            }
            if (!flag)
            {
                counter2++;

                arBools.Add(false);

                foreach (MarkerScript scr  in mSc)
                {
                    scr.OQODQQDO.Add(so.id);
                    scr.ODOQQQDO.Add(so.markerActive);
                    scr.OQQODQQOO.Add(true);
                    scr.ODDOQQOO.Add(so.splinePosition);
                }
            }
        }

        ODODQQOD = arBools.ToArray();


        ODQQQQQO = new String[ODODOQQO.Length];
        ODODOQQO.CopyTo(ODQQQQQO, 0);



        List <int> arInt = new List <int>();

        for (int i = 0; i < ODODQQOD.Length; i++)
        {
            if (ODODQQOD[i])
            {
                arInt.Add(i);
            }
        }
        OOQQQOQO = arInt.ToArray();


        foreach (MarkerScript scr  in mSc)
        {
            scr.ODDOOQDO = scr.OQODQQDO.ToArray();
            scr.ODDGDOOO = scr.ODOQQQDO.ToArray();
            scr.ODDQOOO  = scr.OQQODQQOO.ToArray();
            scr.ODDQOODO = scr.ODDOQQOO.ToArray();
        }
        if (saveSOs)
        {
        }
    }
コード例 #17
0
ファイル: SideObjectImporter.cs プロジェクト: KeriN0s/Arazi
    public void OnGUI()
    {
        if (titleContent.text == "SideObjectImporter")
        {
            titleContent = new GUIContent("Import Side Objects");
        }
        bool sel = false;

        foreach (bool flag in flags)
        {
            if (flag)
            {
                sel = true;
                break;
            }
        }
        scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
        int i = 0;

        foreach (String so in sideobjects)
        {
            flags[i] = EditorGUILayout.Toggle(flags[i]);
            GUILayout.Space(-20);
            GUILayout.Label("    " + so, GUILayout.Width(150));
            i++;
        }
        EditorGUILayout.EndScrollView();
        if (!sel)
        {
            GUI.enabled = false;
        }
        EditorGUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        if (GUILayout.Button("Import", GUILayout.Width(125), GUILayout.Height(25)))
        {
            List <string> comboValues = new List <string>();
            for (i = 0; i < OOCQCOCDOQ.roadObjects.Length; i++)
            {
                comboValues.Add(OOCQCOCDOQ.roadObjects[i]);
            }



            for (i = 0; i < flags.Length; i++)
            {
                if (flags[i])
                {
                    ODODDQQO thisso = (ODODDQQO)importedSos[i];
                    if (CheckExists(thisso))
                    {
                    }
                    else
                    {
                        thisso.name = CheckName(thisso.name);
                        comboValues.Add(thisso.name);
                        OOCQCOCDOQ.ODCOQOCDCD.Add(thisso);
                    }
                }
            }

            OOCQCOCDOQ.roadObjects = comboValues.ToArray();
            OOCQCOCDOQ.OQDDOCQDDQ();
            ObjectManager.instance.Repaint();
            instance.Close();
        }
        EditorGUILayout.EndHorizontal();
    }
コード例 #18
0
    public void OOOOOOODCD(ArrayList arr, string[] DOODQOQO, string[] OODDQOQO)
    {
        bool flag = false;

        RoadObjectScript.ODODOQQO = DOODQOQO;
        RoadObjectScript.ODODQOOQ = OODDQOQO;
        ArrayList arrayLists = new ArrayList();

        if (this.obj == null)
        {
            this.ODOCOQCCOC(base.transform, null, null, null);
        }
        IEnumerator enumerator = this.obj.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                Transform current = (Transform)enumerator.Current;
                if (current.name != "Markers")
                {
                    continue;
                }
                IEnumerator enumerator1 = current.GetEnumerator();
                try
                {
                    while (enumerator1.MoveNext())
                    {
                        MarkerScript component = ((Transform)enumerator1.Current).GetComponent <MarkerScript>();
                        component.OQODQQDO.Clear();
                        component.ODOQQQDO.Clear();
                        component.OQQODQQOO.Clear();
                        component.ODDOQQOO.Clear();
                        arrayLists.Add(component);
                    }
                }
                finally
                {
                    IDisposable disposable = enumerator1 as IDisposable;
                    if (disposable == null)
                    {
                    }
                    disposable.Dispose();
                }
            }
        }
        finally
        {
            IDisposable disposable1 = enumerator as IDisposable;
            if (disposable1 == null)
            {
            }
            disposable1.Dispose();
        }
        this.mSc = (MarkerScript[])arrayLists.ToArray(typeof(MarkerScript));
        ArrayList arrayLists1 = new ArrayList();
        int       num         = 0;
        int       num1        = 0;

        if (this.ODQQQQQO != null)
        {
            if (arr.Count == 0)
            {
                return;
            }
            for (int i = 0; i < (int)RoadObjectScript.ODODOQQO.Length; i++)
            {
                ODODDQQO item = (ODODDQQO)arr[i];
                for (int j = 0; j < (int)this.ODQQQQQO.Length; j++)
                {
                    if (RoadObjectScript.ODODOQQO[i] == this.ODQQQQQO[j])
                    {
                        num++;
                        if ((int)this.ODODQQOD.Length <= j)
                        {
                            arrayLists1.Add(false);
                        }
                        else
                        {
                            arrayLists1.Add(this.ODODQQOD[j]);
                        }
                        MarkerScript[] markerScriptArray = this.mSc;
                        for (int k = 0; k < (int)markerScriptArray.Length; k++)
                        {
                            MarkerScript markerScript = markerScriptArray[k];
                            int          num2         = -1;
                            int          num3         = 0;
                            while (num3 < (int)markerScript.ODDOOQDO.Length)
                            {
                                if (item.id != markerScript.ODDOOQDO[num3])
                                {
                                    num3++;
                                }
                                else
                                {
                                    num2 = num3;
                                    break;
                                }
                            }
                            if (num2 < 0)
                            {
                                markerScript.OQODQQDO.Add(item.id);
                                markerScript.ODOQQQDO.Add(item.markerActive);
                                markerScript.OQQODQQOO.Add(true);
                                markerScript.ODDOQQOO.Add(item.splinePosition);
                            }
                            else
                            {
                                markerScript.OQODQQDO.Add(markerScript.ODDOOQDO[num2]);
                                markerScript.ODOQQQDO.Add(markerScript.ODDGDOOO[num2]);
                                markerScript.OQQODQQOO.Add(markerScript.ODDQOOO[num2]);
                                if (item.sidewaysDistanceUpdate == 0 || item.sidewaysDistanceUpdate == 2 && (float)markerScript.ODDQOODO[num2] != item.oldSidwaysDistance)
                                {
                                    markerScript.ODDOQQOO.Add(markerScript.ODDQOODO[num2]);
                                }
                                else
                                {
                                    markerScript.ODDOQQOO.Add(item.splinePosition);
                                }
                            }
                        }
                    }
                }
                item.sidewaysDistanceUpdate == 0;
                flag = false;
            }
        }
        for (int l = 0; l < (int)RoadObjectScript.ODODOQQO.Length; l++)
        {
            ODODDQQO oDODDQQO = (ODODDQQO)arr[l];
            bool     flag1    = false;
            for (int m = 0; m < (int)this.ODQQQQQO.Length; m++)
            {
                if (RoadObjectScript.ODODOQQO[l] == this.ODQQQQQO[m])
                {
                    flag1 = true;
                }
            }
            if (!flag1)
            {
                num1++;
                arrayLists1.Add(false);
                MarkerScript[] markerScriptArray1 = this.mSc;
                for (int n = 0; n < (int)markerScriptArray1.Length; n++)
                {
                    MarkerScript markerScript1 = markerScriptArray1[n];
                    markerScript1.OQODQQDO.Add(oDODDQQO.id);
                    markerScript1.ODOQQQDO.Add(oDODDQQO.markerActive);
                    markerScript1.OQQODQQOO.Add(true);
                    markerScript1.ODDOQQOO.Add(oDODDQQO.splinePosition);
                }
            }
        }
        this.ODODQQOD = (bool[])arrayLists1.ToArray(typeof(bool));
        this.ODQQQQQO = new string[(int)RoadObjectScript.ODODOQQO.Length];
        RoadObjectScript.ODODOQQO.CopyTo(this.ODQQQQQO, 0);
        ArrayList arrayLists2 = new ArrayList();

        for (int o = 0; o < (int)this.ODODQQOD.Length; o++)
        {
            if (this.ODODQQOD[o])
            {
                arrayLists2.Add(o);
            }
        }
        this.OOQQQOQO = (int[])arrayLists2.ToArray(typeof(int));
        MarkerScript[] markerScriptArray2 = this.mSc;
        for (int p = 0; p < (int)markerScriptArray2.Length; p++)
        {
            MarkerScript array = markerScriptArray2[p];
            array.ODDOOQDO = (string[])array.OQODQQDO.ToArray(typeof(string));
            array.ODDGDOOO = (bool[])array.ODOQQQDO.ToArray(typeof(bool));
            array.ODDQOOO  = (bool[])array.OQQODQQOO.ToArray(typeof(bool));
            array.ODDQOODO = (float[])array.ODDOQQOO.ToArray(typeof(float));
        }
        !flag;
    }