public List <LearningBlockInfo> GetLearningBlockInfosForStage(int targetStage) { // @todo: this could use the new ScoreHelper methods // @todo: probably move this to ScoreHelper List <LearningBlockInfo> learningBlockInfo_list = new List <LearningBlockInfo>(); List <Db.LearningBlockData> learningBlockData_list = FindLearningBlockDataOfStage(targetStage); foreach (var learningBlockData in learningBlockData_list) { LearningBlockInfo info = new LearningBlockInfo(); info.data = learningBlockData; info.score = 0; // 0 if not found otherwise in the next step learningBlockInfo_list.Add(info); } // Find all previous scores List <Db.ScoreData> scoreData_list = teacher.scoreHelper.GetCurrentScoreForLearningBlocksOfStage(targetStage); for (int i = 0; i < learningBlockInfo_list.Count; i++) { var info = learningBlockInfo_list[i]; var scoreData = scoreData_list.Find(x => x.TableName == typeof(Db.LearningBlockData).Name && x.ElementId == info.data.Id); info.score = scoreData.Score; } return(learningBlockInfo_list); }
public void Init(JourneyPanel _manager, LearningBlockInfo _info) { uIButton = GetComponent <UIButton>(); learningBlockInfo = _info; manager = _manager; Info.text = learningBlockInfo.data.Id; Title.text = learningBlockInfo.data.Title_Ar; SubTitle.text = learningBlockInfo.data.Title_En; if (learningBlockInfo.unlocked || AppManager.I.Player.IsDemoUser) { LockIcon.enabled = false; } else { LockIcon.enabled = true; } //var score = learningBlockInfo.score; // @note: we should already save the score when a block is finished, and not compute it when showing it //var score = TeacherAI.I.GetLearningBlockScore(info.data); //Info.text = "Score: " + score; Highlight(false); }
public List <LearningBlockInfo> GetLearningBlockInfosForStage(int targetStage) { // @todo: this could use the new ScoreHelper methods // @todo: probably move this to ScoreHelper var learningBlockInfo_list = new List <LearningBlockInfo>(); var learningBlockData_list = FindLearningBlockDataOfStage(targetStage); foreach (var learningBlockData in learningBlockData_list) { var LB_info = new LearningBlockInfo(); LB_info.data = learningBlockData; LB_info.score = 0; // 0 if not found otherwise in the next step learningBlockInfo_list.Add(LB_info); } // Find all previous scores var scoreData_list = AppManager.I.ScoreHelper.GetCurrentScoreForLearningBlocksOfStage(targetStage); for (int i = 0; i < learningBlockInfo_list.Count; i++) { var LB_info = learningBlockInfo_list[i]; var scoreData = scoreData_list.Find(x => x.JourneyDataType == JourneyDataType.LearningBlock && x.ElementId == LB_info.data.Id); LB_info.score = scoreData.GetScore(); } return(learningBlockInfo_list); }
public void DetailLearningBlock(LearningBlockInfo _currentLearningBlock) { currentLearningBlock = _currentLearningBlock; DetailPanel.SetActive(true); AudioManager.I.PlayLearningBlock(currentLearningBlock.data.AudioFile); DetailCodeText.text = currentLearningBlock.data.Id; DetailTitleText.text = currentLearningBlock.data.Title_LearningLang; DetailDescriptionEn.text = currentLearningBlock.data.Description_NativeLang; DetailDescriptionAr.text = currentLearningBlock.data.Description_LearningLang; HighlightItem(currentLearningBlock.data.Id); ScoreText.text = "Score: " + currentLearningBlock.score; }
public void DetailLearningBlock(LearningBlockInfo info) { DetailPanel.SetActive(true); AudioManager.I.PlayDialog(info.data.GetTitleSoundFilename()); ScoreText.text = "Score: " + info.score; MoreInfoPanel.SetActive(false); ArabicText.text = info.data.Title_Ar; LL_Isolated.gameObject.SetActive(false); LL_Initial.gameObject.SetActive(false); LL_Medial.gameObject.SetActive(false); LL_Final.gameObject.SetActive(false); }
public void Init(BookPanel _manager, LearningBlockInfo _info) { info = _info; manager = _manager; Title.text = info.data.Title_Ar; SubTitle.text = info.data.Title_En + " " + info.data.Id; if (info.unlocked || AppManager.I.GameSettings.CheatSuperDogMode) { LockIcon.enabled = false; } else { LockIcon.enabled = true; } var score = info.score; // @note: we should already save the score when a block is finished, and not compute it when showing it //var score = TeacherAI.I.GetLearningBlockScore(info.data); Info.text = "Score: " + score; }