Beispiel #1
0
        public static ScoreB[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            if (javaUnityApplicasaScoreB == null)
            {
                javaUnityApplicasaScoreB = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaScoreB");
            }

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

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

                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());
                ScoreB[]            scoreBtemp = new ScoreB[InnerArray.Length];
                for (int j = 0; j < InnerArray.Length; j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    scoreBtemp[j] = new ScoreB(tempObj.GetRawObject(), tempObj);
                }
                if (scoreBInner == null)
                {
                    scoreBInner = scoreBtemp;
                }
                else
                {
                    ScoreB[] firstOne = scoreBInner;
                    scoreBInner = new ScoreB[firstOne.Length + scoreBtemp.Length];
                    firstOne.CopyTo(scoreBInner, 0);
                    scoreBtemp.CopyTo(scoreBInner, firstOne.Length);
                }
            }
            return(scoreBInner);
        }
Beispiel #2
0
        public static IEnumerator GetScoreBArrayIEnumerator(ScoreBArray scoreBArray)
        {
            yield return(new WaitForSeconds(0.2f));

            ScoreB[] scoreBInner = new ScoreB[0];
            finalScoreB = scoreBInner;
        }
Beispiel #3
0
        public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
        {
            yield return(new WaitForSeconds(0.2f));

            ScoreB[] scoreBInner = new ScoreB[0];
            finalScoreB = scoreBInner;
        }
Beispiel #4
0
        public static ScoreB[] GetScoreBArray(ScoreBArray scoreBArray)
        {
            ScoreB[] scoreBs = new ScoreB[scoreBArray.ArraySize];

            for (int i = 0; i < scoreBArray.ArraySize; i++)
            {
                IntPtr newPtr = Marshal.ReadIntPtr(scoreBArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                scoreBs[i] = new ScoreB(newPtr);
            }
            return(scoreBs);
        }
Beispiel #5
0
        public static ScoreB[] GetScoreBArray(ScoreBArray scoreBArray)
        {
            ScoreB[]            scoreBInner = new ScoreB[scoreBArray.ArraySize];
            AndroidJavaObject[] bigArray    = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(scoreBArray.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];
                    scoreBInner[count] = new ScoreB(tempObj.GetRawObject(), tempObj);
                    count++;
                }
            }
            return(scoreBInner);
        }
Beispiel #6
0
        public static IEnumerator GetScoreBArrayIEnumerator(ScoreBArray scoreBArray)
        {
            ScoreB[]            scoreBInner = new ScoreB[scoreBArray.ArraySize];
            AndroidJavaObject[] bigArray    = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(scoreBArray.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];
                    scoreBInner[count] = new ScoreB(tempObj.GetRawObject(), tempObj);
                    count++;
                }
                yield return(new WaitForSeconds(0.2f));
            }
            finalScoreB = scoreBInner;
        }
Beispiel #7
0
        public static ScoreB[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            ScoreB[] scoreB = new ScoreB[0];

            return(scoreB);
        }
Beispiel #8
0
 public static ScoreB[] GetScoreBArray(ScoreBArray scoreBArray)
 {
     ScoreB[] scoreBs = new ScoreB[0];
     return(scoreBs);
 }
Beispiel #9
0
 public static IEnumerator GetScoreBArrayIEnumerator(ScoreBArray scoreBArray)
 {
     yield return new WaitForSeconds(0.2f);
     ScoreB[]  scoreBInner = new ScoreB[0];
     finalScoreB = scoreBInner;
 }
Beispiel #10
0
        public static ScoreB[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            ScoreB[] scoreB = new ScoreB[0];

            return scoreB;
        }
Beispiel #11
0
 public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
 {
     yield return new WaitForSeconds(0.2f);
         ScoreB[]  scoreBInner = new ScoreB[0];
         finalScoreB = scoreBInner;
 }
Beispiel #12
0
        public static IEnumerator GetScoreBArrayIEnumerator(ScoreBArray scoreBArray)
        {
            ScoreB[] scoreBInner = new ScoreB[scoreBArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(scoreBArray.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];
                    scoreBInner[count] = new ScoreB(tempObj.GetRawObject(),tempObj);
                    count++;
                }
                yield return new WaitForSeconds(0.2f);
            }
            finalScoreB = scoreBInner;
        }
Beispiel #13
0
        public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
        {
            if(javaUnityApplicasaScoreB==null)
                javaUnityApplicasaScoreB = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaScoreB");

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

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

                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());
                ScoreB[] scoreBtemp = new ScoreB[InnerArray.Length];
                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    scoreBtemp[j] = new ScoreB(tempObj.GetRawObject(),tempObj);
                }
                if (scoreBInner == null)
                    scoreBInner = scoreBtemp;
                else{
                   ScoreB[] firstOne = scoreBInner;
                    scoreBInner = new ScoreB[firstOne.Length+scoreBtemp.Length];
                    firstOne.CopyTo(scoreBInner,0);
                    scoreBtemp.CopyTo(scoreBInner,firstOne.Length);
                }
                yield return new WaitForSeconds(0.2f);
            }
            finalScoreB = scoreBInner;
        }
Beispiel #14
0
 public static ScoreB[] GetScoreBArray(ScoreBArray scoreBArray)
 {
     ScoreB[] scoreBs = new ScoreB[0];
     return scoreBs;
 }
Beispiel #15
0
        public static ScoreB[] GetScoreBArray(ScoreBArray scoreBArray)
        {
            ScoreB[] scoreBs = new ScoreB[scoreBArray.ArraySize];

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

                IntPtr newPtr = Marshal.ReadIntPtr (scoreBArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                scoreBs[i] = new ScoreB(newPtr);
            }
            return scoreBs;
        }
Beispiel #16
0
        public static ScoreB[] GetScoreBArray(ScoreBArray scoreBArray)
        {
            ScoreB[] scoreBInner = new ScoreB[scoreBArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(scoreBArray.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];
                    scoreBInner[count] = new ScoreB(tempObj.GetRawObject(),tempObj);
                    count++;
                }
            }
            return scoreBInner;
        }