public IEnumerator test() { //UNIT TESTING ZONE: CoroutineWithData cd = new CoroutineWithData(this, GetUserByName("carla")); yield return(cd.coroutine); UserVO testuser = cd.result as UserVO; //UNIT TESTING ZONE: CoroutineWithData cd1 = new CoroutineWithData(this, GetUserSubjects(testuser.subjects)); yield return(cd1.coroutine); IList <SubjectVO> testsubs = cd1.result as List <SubjectVO>; CoroutineWithData cd2 = new CoroutineWithData(this, GetSubjectContentList(testsubs[0])); yield return(cd2.coroutine); IList <ContentVO> contents = cd2.result as List <ContentVO>; CoroutineWithData cd3 = new CoroutineWithData(this, GetPointerByContent(contents[0])); yield return(cd3.coroutine); PointerVO pointer = cd3.result as PointerVO; CoroutineWithData cd4 = new CoroutineWithData(this, GetPointerBySubject(testsubs[0])); yield return(cd4.coroutine); PointerVO pointer1 = cd4.result as PointerVO; CoroutineWithData cd5 = new CoroutineWithData(this, GetUserGroups(testuser)); yield return(cd5.coroutine); IList <GroupVO> groups = cd5.result as List <GroupVO>; }
public IEnumerator GetPointerBySubject(SubjectVO subject) { //https://popping-fire-7321.firebaseio.com/pointer.json?orderBy="subject"&equalTo="-KE7_i9kraAcrPa5XwI3"&print=pretty' string url = "pointer.json?orderBy=\"subject\"&equalTo=\"" + subject.key + "\""; CoroutineWithData cd = new CoroutineWithData(this, myFirebase.GET(url)); yield return(cd.coroutine); PointerVO pointer = customDeserializer.deserializeToPointer(cd.result.ToString()); Debug.Log("Pointer from Subject: " + pointer.subject_id); yield return(pointer); }
public IEnumerator GetPointerByContent(ContentVO content) { //'https://popping-fire-7321.firebaseio.com/pointer.json?orderBy="content"&equalTo="-KAGMywVBTFkPIHQNzL9"&print=pretty' string url = "pointer.json?orderBy=\"content\"&equalTo=\"" + content.key + "\""; CoroutineWithData cd = new CoroutineWithData(this, myFirebase.GET(url)); yield return(cd.coroutine); PointerVO pointer = customDeserializer.deserializeToPointer(cd.result.ToString()); Debug.Log("Pointer from Content: " + pointer.content_id); yield return(pointer); }
public PointerVO deserializeToPointer(string response) { IDictionary search = Json.Deserialize(response) as IDictionary; PointerVO pointer = new PointerVO(); foreach (var key in search.Keys) { IDictionary temp = (IDictionary)search[key]; pointer.key = key.ToString(); pointer.content_id = temp["content"].ToString(); pointer.subject_id = temp["subject"].ToString(); } return(pointer); }
public void PointerHitChecker(int nId) { PointerVO pointer = m_pointerContainerVO.PointerList.Find(a => a.Id == nId); if (pointer.StartPointerId == m_nHitablePointerId) { m_nHitablePointerId = pointer.Id; HitCorrectPointer(pointer.Id); if (pointer.EndPointerId == 0) { StageWin(); } else { RecognizeNextPointer(pointer.EndPointerId); } } }