Пример #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);
        }
Пример #2
0
        public static IEnumerator GetScoreBArrayIEnumerator(ScoreBArray scoreBArray)
        {
            yield return(new WaitForSeconds(0.2f));

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

            ScoreB[] scoreBInner = new ScoreB[0];
            finalScoreB = scoreBInner;
        }
Пример #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);
        }
Пример #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);
        }
Пример #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;
        }
Пример #7
0
        public static ScoreB[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            ScoreB[] scoreB = new ScoreB[0];

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

            return scoreB;
        }
Пример #11
0
 public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
 {
     yield return new WaitForSeconds(0.2f);
         ScoreB[]  scoreBInner = new ScoreB[0];
         finalScoreB = scoreBInner;
 }
Пример #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;
        }
Пример #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;
        }
Пример #14
0
 public static ScoreB[] GetScoreBArray(ScoreBArray scoreBArray)
 {
     ScoreB[] scoreBs = new ScoreB[0];
     return scoreBs;
 }
Пример #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;
        }
Пример #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;
        }