// Use this for initialization void Start() { GameObject gameWorldObj = GameObject.Find("Camera"); gameWorld = gameWorldObj.GetComponent(typeof(GameWorld)) as GameWorld; meditationService = gameWorldObj.GetComponent(typeof(MeditationService)) as MeditationService; }
public async Task <MeditationModel> FetchAllMeditationDetailItem(string id) { var meditationService = new MeditationService(); MeditationModel med = await meditationService.fetchMeditationBaseOnIdAsync(id); if (med != null) { return(med); } else { Debug.WriteLine("Meditaion empty return"); return(null); } }
public async Task <List <Category> > FetchAllMeditationCategory() { var meditationService = new MeditationService(); MeditationModel[] allMeditation = await meditationService.fetchAllMeditationAsync(); if (allMeditation != null && allMeditation.Length > 0) // extract unique meditation categories from all meditattion list { List <Category> list = AppUtils.CategoryUtil.GetCount(allMeditation); return(list); } else { Debug.WriteLine("Meditation list in Category page in empty"); return(null); } }
public async Task <List <MeditationModel> > FetchAllMeditationCategoryItems() { var meditationService = new MeditationService(); MeditationModel[] allMeditation = await meditationService.fetchAllMeditationAsync(); if (allMeditation != null && allMeditation.Length > 0) // extrect med items bases on selected category { List <MeditationModel> medBasesOnSelectedMedCategory = allMeditation.Where(g => g.category == selectedCategoryType).ToList(); return(medBasesOnSelectedMedCategory); } else { Debug.WriteLine("Meditation list in Category item page in empty"); return(null); } }
public async Task <List <MeditationModel> > FetchAllMeditationData() { var meditationService = new MeditationService(); MeditationModel[] allMeditation = await meditationService.FetchAllMeditationAsync(); if (allMeditation != null && allMeditation.Length > 0) { List <MeditationModel> allMeditationData = allMeditation.ToList(); return(allMeditationData); } else { Debug.WriteLine("Meditation data is empty on Meditation Category page"); return(null); } }