示例#1
0
        public static IEnumerator GetLevelsArrayIEnumerator(LevelsArray levelsArray)
        {
            Levels[]            levelsInner = new Levels[levelsArray.ArraySize];
            AndroidJavaObject[] bigArray    = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(levelsArray.Array);

            int count = 0;

            for (int i = 0; i < bigArray.Length; i++)
            {
                AndroidJavaObject   tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray     = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0; j < InnerArray.Length; j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    levelsInner[count] = new Levels(tempObj.GetRawObject(), tempObj);
                    count++;
                }
                yield return(new WaitForSeconds(0.2f));
            }
            finalLevels = levelsInner;
        }
示例#2
0
        public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
        {
            if (javaUnityApplicasaLevels == null)
            {
                javaUnityApplicasaLevels = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaLevels");
            }

            AndroidJavaObject[] bigArray = javaUnityApplicasaLevels.CallStatic <AndroidJavaObject[]>("ApplicasaLevelsGetArrayWithQuerySync", query.innerQueryJavaObject, (int)queryKind);

            Levels[] levelsInner = null;;
            for (int i = 0; i < bigArray.Length; i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];

                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());
                Levels[]            levelstemp = new Levels[InnerArray.Length];
                for (int j = 0; j < InnerArray.Length; j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    levelstemp[j] = new Levels(tempObj.GetRawObject(), tempObj);
                }
                if (levelsInner == null)
                {
                    levelsInner = levelstemp;
                }
                else
                {
                    Levels[] firstOne = levelsInner;
                    levelsInner = new Levels[firstOne.Length + levelstemp.Length];
                    firstOne.CopyTo(levelsInner, 0);
                    levelstemp.CopyTo(levelsInner, firstOne.Length);
                }
                yield return(new WaitForSeconds(0.2f));
            }
            finalLevels = levelsInner;
        }
示例#3
0
        public static Levels[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            Levels[] levels = new Levels[0];

            return(levels);
        }
示例#4
0
 public static IEnumerator GetLevelsArrayIEnumerator(LevelsArray levelsArray)
 {
     yield return new WaitForSeconds(0.2f);
     Levels[]  levelsInner = new Levels[0];
     finalLevels = levelsInner;
 }
示例#5
0
 public static Levels[] GetLevelsArray(LevelsArray levelsArray)
 {
     Levels[] levelss = new Levels[0];
     return(levelss);
 }
示例#6
0
        public static Levels[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            Levels[] levels = new Levels[0];

            return levels;
        }
示例#7
0
 public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
 {
     yield return new WaitForSeconds(0.2f);
         Levels[]  levelsInner = new Levels[0];
         finalLevels = levelsInner;
 }
示例#8
0
        public static IEnumerator GetLevelsArrayIEnumerator(LevelsArray levelsArray)
        {
            Levels[] levelsInner = new Levels[levelsArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(levelsArray.Array);

            int count = 0;
            for (int i = 0;i < bigArray.Length;i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    levelsInner[count] = new Levels(tempObj.GetRawObject(),tempObj);
                    count++;
                }
                yield return new WaitForSeconds(0.2f);
            }
            finalLevels = levelsInner;
        }
示例#9
0
        public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
        {
            if(javaUnityApplicasaLevels==null)
                javaUnityApplicasaLevels = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaLevels");

                AndroidJavaObject[] bigArray = javaUnityApplicasaLevels.CallStatic<AndroidJavaObject[]>("ApplicasaLevelsGetArrayWithQuerySync", query.innerQueryJavaObject, (int)queryKind);

            Levels[] levelsInner= null;;
            for (int i = 0;i < bigArray.Length;i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];

                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());
                Levels[] levelstemp = new Levels[InnerArray.Length];
                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    levelstemp[j] = new Levels(tempObj.GetRawObject(),tempObj);
                }
                if (levelsInner == null)
                    levelsInner = levelstemp;
                else{
                   Levels[] firstOne = levelsInner;
                    levelsInner = new Levels[firstOne.Length+levelstemp.Length];
                    firstOne.CopyTo(levelsInner,0);
                    levelstemp.CopyTo(levelsInner,firstOne.Length);
                }
                yield return new WaitForSeconds(0.2f);
            }
            finalLevels = levelsInner;
        }
示例#10
0
 public static Levels[] GetLevelsArray(LevelsArray levelsArray)
 {
     Levels[] levelss = new Levels[0];
     return levelss;
 }
示例#11
0
        public static Levels[] GetLevelsArray(LevelsArray levelsArray)
        {
            Levels[] levelss = new Levels[levelsArray.ArraySize];

            for (int i=0; i < levelsArray.ArraySize; i++) {

                IntPtr newPtr = Marshal.ReadIntPtr (levelsArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                levelss[i] = new Levels(newPtr);
            }
            return levelss;
        }
示例#12
0
        public static Levels[] GetLevelsArray(LevelsArray levelsArray)
        {
            Levels[] levelsInner = new Levels[levelsArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(levelsArray.Array);

            int count = 0;
            for (int i = 0;i < bigArray.Length;i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    levelsInner[count] = new Levels(tempObj.GetRawObject(),tempObj);
                    count++;
                }
            }
            return levelsInner;
        }