internal static IAssessment CreateOrderLettersInWordAssessment() { Init(); AssessmentConfiguration.Instance.PronunceQuestionWhenClicked = true; AssessmentConfiguration.Instance.PronunceAnswerWhenClicked = true; AssessmentConfiguration.Instance.ShowQuestionAsImage = true; // V- -- NO LONGER NEED DEFAULT DRAG BEHAVIOUR IDragManager dragManager = new SortingDragManager(audioManager, context.GetCheckmarkWidget()); IQuestionDecorator questionDecorator = new PronunceImageDecorator(); // OK // V- 100% -- TWEAK TO NO REMOVE LETTER IQuestionGenerator generator = new ImageQuestionGenerator(configuration.Questions, false); // V- 100% -- INJECT DIFFERENT COMPONENTS (Answers have to be "Bucketable", Question no placeholder) ILogicInjector injector = new SortingLogicInjector(dragManager, questionDecorator); IQuestionPlacer questionplacer = new DefaultQuestionPlacer(audioManager, wordSize, letterSize); // OK // V- 100% -- Letters sorted and ticketed IAnswerPlacer answerPlacer = new InARowAnswerPlacer(audioManager, letterSize); gameDescription = Db.LocalizationDataId.Assessment_Order_Letters; return(new DefaultAssessment(answerPlacer, questionplacer, generator, injector, configuration, context, dialogueManager, gameDescription)); }
public void Update(float delta) { timer -= delta; if (timer < 0) { game.EndGame(game.currentStars, game.maxWieght); if (game.currentStars == 0) { AudioManager.I.PlayDialog("Reward_0Star"); //WidgetSubtitles.I.DisplaySentence(Db.LocalizationDataId.Reward_0Star, 4, true); } else { //string dia = "Reward_" + game.currentStars + "Star_" + UnityEngine.Random.Range(1, 4); Db.LocalizationDataId data = randomRewardData(); //WidgetSubtitles.I.gameObject.SetActive(true); AudioManager.I.PlayDialog(data); //WidgetSubtitles.I.DisplaySentence(data , 2, true); } //game.Context.GetAudioManager().PlayDialogue(Db.LocalizationData) //WidgetSubtitles.I.DisplaySentence() //game.EndGame(game.scale.counter / (game.targetScale / 3), game.scale.counter); } }
public void SetSentence(Db.LocalizationDataId sentenceId) { // Debug.Log("SetSentence " + sentenceId); Db.LocalizationData row = LocalizationManager.GetLocalizationData(sentenceId); isArabic = true; text = row.Arabic; }
public static string GetWordCategoryTitle(Db.WordDataCategory cat) { Db.LocalizationDataId loc = Db.LocalizationDataId.UI_None; switch (cat) { case Db.WordDataCategory.People: loc = Db.LocalizationDataId.UI_People; break; case Db.WordDataCategory.Conjunctions: loc = Db.LocalizationDataId.UI_Conjunctions; break; case Db.WordDataCategory.Feeling: loc = Db.LocalizationDataId.UI_Feelings; break; case Db.WordDataCategory.Food: loc = Db.LocalizationDataId.UI_Food; break; case Db.WordDataCategory.FamilyMember: loc = Db.LocalizationDataId.UI_FamilyMembers; break; case Db.WordDataCategory.BodyPart: loc = Db.LocalizationDataId.UI_BodyParts; break; case Db.WordDataCategory.Thing: loc = Db.LocalizationDataId.UI_Things; break; case Db.WordDataCategory.Place: loc = Db.LocalizationDataId.UI_Places; break; case Db.WordDataCategory.Sport: loc = Db.LocalizationDataId.UI_Sports; break; case Db.WordDataCategory.Animal: loc = Db.LocalizationDataId.UI_Animals; break; case Db.WordDataCategory.General: loc = Db.LocalizationDataId.UI_General; break; case Db.WordDataCategory.Furniture: loc = Db.LocalizationDataId.UI_Furniture; break; case Db.WordDataCategory.Size: loc = Db.LocalizationDataId.UI_Size; break; case Db.WordDataCategory.Nature: loc = Db.LocalizationDataId.UI_Nature; break; case Db.WordDataCategory.Vehicle: loc = Db.LocalizationDataId.UI_Vehicles; break; case Db.WordDataCategory.Job: loc = Db.LocalizationDataId.UI_Jobs; break; case Db.WordDataCategory.Clothes: loc = Db.LocalizationDataId.UI_Clothes; break; case Db.WordDataCategory.Color: loc = Db.LocalizationDataId.UI_Colors; break; case Db.WordDataCategory.Time: loc = Db.LocalizationDataId.UI_Time; break; case Db.WordDataCategory.Direction: loc = Db.LocalizationDataId.UI_Directions; break; case Db.WordDataCategory.Position: loc = Db.LocalizationDataId.UI_Positions; break; case Db.WordDataCategory.Number: loc = Db.LocalizationDataId.UI_Numbers; break; case Db.WordDataCategory.NumberOrdinal: loc = Db.LocalizationDataId.UI_NumbersOrdinal; break; case Db.WordDataCategory.Shape: loc = Db.LocalizationDataId.UI_Shapes; break; } return(GetTranslation(loc)); }
public void Show(System.Action callback, Db.LocalizationDataId text, LL_WordData word = null) { if (word != null) { WidgetPopupWindow.I.ShowSentenceAndWord(callback, text, word); } else { WidgetPopupWindow.I.ShowSentence(callback, text); } }
public void PlayDialogue(Db.LocalizationDataId text, System.Action callback = null) { if (callback == null) { AudioManager.I.PlayDialog(text.ToString()); } else { AudioManager.I.PlayDialog(text.ToString(), callback); } }
public void Show(System.Action callback, Db.LocalizationDataId text, bool markResult, LL_WordData word = null) { if (word != null) { WidgetPopupWindow.I.ShowSentenceAndWordWithMark(callback, text, word, markResult); } else { WidgetPopupWindow.I.ShowSentenceWithMark(callback, text, markResult, null); } }
public void ShowSentenceAndWord(Action callback, Db.LocalizationDataId SentenceId, LL_WordData wordData) { ResetContents(); currentCallback = callback; ButtonGO.gameObject.SetActive(callback != null); TitleGO.GetComponent <TextRender>().SetSentence(SentenceId); //AudioManager.I.PlayDialog(SentenceId); SetWord(wordData.DrawingCharForLivingLetter, wordData); Show(true); }
public void ShowSentence(Action callback, Db.LocalizationDataId SentenceId) { ResetContents(); currentCallback = callback; ButtonGO.gameObject.SetActive(callback != null); Db.LocalizationData row = LocalizationManager.GetLocalizationData(SentenceId); TitleGO.GetComponent <TextRender>().isArabic = true; TitleGO.GetComponent <TextRender>().text = row.Arabic; AudioManager.I.PlayDialog(SentenceId); Show(true); }
public DefaultAssessment(IAnswerPlacer answ_placer, IQuestionPlacer question_placer, IQuestionGenerator question_generator, ILogicInjector logic_injector, IAssessmentConfiguration game_conf, IGameContext game_context, IDialogueManager dialogues, Db.LocalizationDataId gameDescription) { AnswerPlacer = answ_placer; QuestionGenerator = question_generator; QuestionPlacer = question_placer; LogicInjector = logic_injector; Configuration = game_conf; GameContext = game_context; Dialogues = dialogues; GameDescription = gameDescription; }
public static IAssessment CreateMatchLettersWordAssessment() { Init(); AssessmentConfiguration.Instance.PronunceQuestionWhenClicked = true; AssessmentConfiguration.Instance.PronunceAnswerWhenClicked = true; IAnswerChecker checker = new DefaultAnswerChecker(context.GetCheckmarkWidget(), audioManager, dialogueManager); IDragManager dragManager = new DefaultDragManager(audioManager, checker); IQuestionDecorator questionDecorator = new PronunceQuestionDecorator(); IQuestionGenerator generator = new DefaultQuestionGenerator(configuration.Questions); ILogicInjector injector = new DefaultLogicInjector(dragManager, questionDecorator); IQuestionPlacer questionplacer = new DefaultQuestionPlacer(audioManager, wordSize, letterSize); IAnswerPlacer answerPlacer = new DefaultAnswerPlacer(audioManager); gameDescription = Db.LocalizationDataId.Assessment_Match_Letters_Words; return(new DefaultAssessment(answerPlacer, questionplacer, generator, injector, configuration, context, dialogueManager, gameDescription)); }
public void ShowSentence(Action callback, Db.LocalizationDataId sentenceId, Sprite image2show) { ResetContents(); currentCallback = callback; ButtonGO.gameObject.SetActive(callback != null); if (image2show != null) { TutorialImageGO.GetComponent <Image>().sprite = image2show; TutorialImageGO.SetActive(true); } Db.LocalizationData row = LocalizationManager.GetLocalizationData(sentenceId); TitleGO.GetComponent <TextRender>().isArabic = true; TitleGO.GetComponent <TextRender>().text = row.Arabic; AudioManager.I.PlayDialog(sentenceId); Show(true); }
public static IAssessment CreateSunMoonLetterAssessment() { Init(); AssessmentConfiguration.Instance.PronunceQuestionWhenClicked = true; AssessmentConfiguration.Instance.PronunceAnswerWhenClicked = true; IAnswerChecker checker = new DefaultAnswerChecker(context.GetCheckmarkWidget(), audioManager, dialogueManager); IDragManager dragManager = new DefaultDragManager(audioManager, checker); IQuestionDecorator questionDecorator = new PronunceQuestionDecorator(); ICategoryProvider categoryProvider = new CategoryProvider(CategoryType.SunMoon); IQuestionGenerator generator = new CategoryQuestionGenerator(configuration.Questions, categoryProvider, maxAnswers, rounds); ILogicInjector injector = new DefaultLogicInjector(dragManager, questionDecorator); IQuestionPlacer questionplacer = new CategoryQuestionPlacer(audioManager, letterSize, letterSize); IAnswerPlacer answerPlacer = new DefaultAnswerPlacer(audioManager); gameDescription = Db.LocalizationDataId.Assessment_Classify_Letters_Article; return(new DefaultAssessment(answerPlacer, questionplacer, generator, injector, configuration, context, dialogueManager, gameDescription)); }
public void ShowSentenceWithMark(Action callback, Db.LocalizationDataId sentenceId, bool result, Sprite image2show) { ResetContents(); currentCallback = callback; ButtonGO.gameObject.SetActive(callback != null); MarkOK.SetActive(result); MarkKO.SetActive(!result); if (image2show != null) { TutorialImageGO.GetComponent <Image>().sprite = image2show; TutorialImageGO.SetActive(true); } TitleGO.GetComponent <TextRender>().SetSentence(sentenceId); AudioManager.I.PlayDialog(sentenceId); Show(true); }
public static Db.LocalizationData GetLocalizationData(Db.LocalizationDataId id) { return(AppManager.I.DB.GetLocalizationDataById(id.ToString())); }
public void PlayDialog(Db.LocalizationDataId id, System.Action callback) { PlayDialog(LocalizationManager.GetLocalizationData(id), callback); }
public void PlayDialog(Db.LocalizationDataId id) { PlayDialog(LocalizationManager.GetLocalizationData(id)); }
public void PlayDialog(Db.LocalizationDataId id, bool isKeeper = true, bool autoClose = true, System.Action _callback = null) { PlayDialog(LocalizationManager.GetLocalizationData(id), isKeeper, autoClose, _callback); }
public void SetTitleSentence(Db.LocalizationDataId SentenceId) { TitleGO.GetComponent <TextRender>().SetSentence(SentenceId); }
public void SetMessage(Db.LocalizationDataId SentenceId) { MessageTextGO.GetComponent <TextRender>().SetSentence(SentenceId); }
/// <summary> /// Activate view elements if SentenceId != "" and display sentence. /// </summary> public void DisplaySentence(Db.LocalizationDataId _sentenceId, float _duration = 2, bool _isKeeper = false, System.Action _callback = null) { var data = LocalizationManager.GetLocalizationData(_sentenceId); DisplaySentence(data, _duration, _isKeeper, _callback); }
public void SetTitle(Db.LocalizationDataId text) { WidgetPopupWindow.I.SetTitleSentence(text); }
public void SetMessage(Db.LocalizationDataId text) { WidgetPopupWindow.I.SetMessage(text); }
public static string GetTranslation(Db.LocalizationDataId id) { return(GetLocalizationData(id).Arabic); }
public void DisplaySentence(Db.LocalizationDataId text, float enterDuration, bool showSpeaker, System.Action onSentenceCompleted) { WidgetSubtitles.I.DisplaySentence(text, enterDuration, showSpeaker, onSentenceCompleted); }
public void PlayText(Db.LocalizationDataId text) { PlayDialogue(text, null); }