public void Update(float delta) { timer -= delta; if (timer < 0) { game.EndGame(game.currentStars, game.maxWieght); game.buttonRepeater.SetActive(false); if (game.currentStars == 0) { AudioManager.I.PlayDialogue(Database.LocalizationDataId.Reward_0Star); //WidgetSubtitles.I.DisplaySentence(Db.LocalizationDataId.Reward_0Star, 4, true); } else { //string dia = "Reward_" + game.currentStars + "Star_" + UnityEngine.Random.Range(1, 4); Database.LocalizationDataId data = randomRewardData(); //WidgetSubtitles.I.gameObject.SetActive(true); AudioManager.I.PlayDialogue(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 Show(Database.LocalizationDataId id, Action _onYes, Action _onNo) { var localizationData = LocalizationManager.GetLocalizationData(id); AudioManager.I.PlayDialogue(localizationData); Show(LocalizationManager.GetTranslation(id), localizationData.GetSubtitleTranslation(), _onYes, _onNo); }
/// <summary> /// Activate view elements if SentenceId != "" and display sentence. /// </summary> public void DisplaySentence(Database.LocalizationDataId _sentenceId, float _duration = 2, bool _isKeeper = false, System.Action _callback = null) { var data = LocalizationManager.GetLocalizationData(_sentenceId); DisplaySentence(data, _duration, _isKeeper, _callback); }
public void AddSliderRow(Database.LocalizationDataId _locaData, float _value, float _valueMax) { var loc = LocalizationManager.GetLocalizationData(_locaData); rowGO = Instantiate(RowSliderPrefab); rowGO.transform.SetParent(transform, false); rowGO.GetComponent <TableRow>().InitSlider(loc.English, loc.Arabic, _value, _valueMax); }
public void AddRow(Database.LocalizationDataId _locaData, string _value) { var loc = LocalizationManager.GetLocalizationData(_locaData); rowGO = Instantiate(RowPrefab); rowGO.transform.SetParent(transform, false); rowGO.GetComponent <TableRow>().Init(loc.English, loc.Arabic, _value); }
public void Show(System.Action callback, Database.LocalizationDataId text, LL_WordData word = null) { if (word != null) { WidgetPopupWindow.I.ShowSentenceAndWord(callback, text, word); } else { WidgetPopupWindow.I.ShowSentence(callback, text); } }
public void Show(System.Action callback, Database.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 PlayDialogue(Database.LocalizationDataId text, System.Action callback = null) { if (callback == null) { AudioManager.I.PlayDialogue(text.ToString()); } else { AudioManager.I.PlayDialogue(text.ToString(), callback); } }
public void Show(Database.LocalizationDataId id, Action _onYes, Action _onNo, KeeperMode keeperMode = KeeperMode.Default) { var localizationData = LocalizationManager.GetLocalizationData(id); KeeperManager.I.PlayDialogue(id, keeperMode: keeperMode); if (keeperMode == KeeperMode.NativeNoSubtitles || keeperMode == KeeperMode.NativeAndSubtitles) { Show(localizationData.NativeText, localizationData.GetNativeText(), _onYes, _onNo); } else { Show(LocalizationManager.GetLearning(id), localizationData.GetNativeText(), _onYes, _onNo); } }
public void SetTitle(Database.LocalizationDataId text) { WidgetPopupWindow.I.SetTitleSentence(text); }
public void SetMessage(Database.LocalizationDataId text) { WidgetPopupWindow.I.SetMessage(text); }
/// <summary> /// Shows a popup with a YES/NO button and relative callbacks /// </summary> public static void ShowPrompt(Database.LocalizationDataId id, Action _onYesCallback = null, Action _onNoCallback = null, KeeperMode keeperMode = KeeperMode.Default) { Prompt.Show(id, _onYesCallback, _onNoCallback, keeperMode); }
public void DisplaySentence(Database.LocalizationDataId text, float enterDuration, bool showSpeaker, System.Action onSentenceCompleted) { WidgetSubtitles.I.DisplayDialogue(text, enterDuration, showSpeaker, onSentenceCompleted); }
public void PlayDialog(Database.LocalizationDataId id, bool isKeeper = true, bool autoClose = true, System.Action _callback = null) { PlayDialog(LocalizationManager.GetLocalizationData(id), isKeeper, autoClose, _callback); }
public void SetSentence(Database.LocalizationDataId sentenceId) { // Debug.Log("SetSentence " + sentenceId); isArabic = true; text = LocalizationManager.GetTranslation(sentenceId); }
/// <summary> /// Shows a popup with a YES/NO button and relative callbacks /// </summary> public static void ShowPrompt(Database.LocalizationDataId id, Action _onYesCallback = null, Action _onNoCallback = null) { Prompt.Show(id, _onYesCallback, _onNoCallback); }