示例#1
0
    public static BlockHitList createList2(List <List <Vector2[]> > listOfObjects, Transform[] _allTransformList, string fileName)
    {
        var bhList = new BlockHitList(listOfObjects.Count);

        for (int x = 0; x < _allTransformList.Length; x++)
        {
            if (_allTransformList[x] == null)
            {
                continue;
            }

            if (listOfObjects[x] == null)
            {
                continue;
            }

            var anObject = new List <Vector2[]>();

            for (int y = 0; y < listOfObjects[x].Count; y++)
            {
                if (listOfObjects[x][y] != null && listOfObjects[x][y].Length > 0)
                {
                    anObject.Add(listOfObjects[x][y]);
                }
            }

            if (anObject.Count > 0)
            {
                bhList.setPath3(x, _allTransformList[x].name, anObject);
            }
        }

        bhList.clean();
        return(bhList);
    }
示例#2
0
    public static BlockHitList  createList(List <Vector2[]> listOfObjects, string filename)
    {
        var bhlist = new BlockHitList(listOfObjects.Count);

        try
        {
            for (int x = 0; x < listOfObjects.Count; x++)
            {
                bhlist.setPath(x, listOfObjects[x]);
            }
        }
        catch
        {
            Debug.Log("Problem on BlockHitList Class");
        }
        return(bhlist);
    }