private void HoverOnEffect() { interactableAudio.HoverOnSound(); glow.DOFillAmount(1, ViewValues.FAST_TIME); text.DOText(textToShow, ViewValues.FAST_TIME); transform.DOScale(SCALE, ViewValues.FAST_TIME); }
private void UpdateTurnUI(BattleController.Turn turn) { Color transitionColor = Color.black; if (turn == BattleController.Turn.Player) { transitionColor = Color.blue; } else { transitionColor = Color.red; } float fadeDuration = 0.75f; Sequence fadeSequence = DOTween.Sequence(); fadeSequence .Append(turnText.DOFade(0, fadeDuration)) .Append(turnText.DOText(turn + " Turn", 0)) .Append(turnText.DOColor(transitionColor, 0)) .Append(turnText.DOFade(1, fadeDuration)); //fadeSequence.SetEase(Ease.InFlash); buttonsContainer.gameObject.SetActive((turn == BattleController.Turn.Player)); DeactivatePanel(); battleController.Attacking = false; Pathfinding.DeselectNodes(battleController.Nodes); }
public IEnumerator BootSequence() { if (!bypassBoot) { for (int i = 0; i < BootText.Length; i++) { if (BootText[i] == "") { totalText += BootText[i] + "\n\n"; textBox.text = totalText; yield return(new WaitForSeconds(Random.Range(0.3f, 2f))); } else { totalText += BootText[i] + "\n"; Tween doT = textBox.DOText(totalText, 0.7f); yield return(doT.WaitForCompletion()); } } } yield return(new WaitForSeconds(0.5f)); isBooted = true; FindObjectOfType <GoalManager>().StartTuto(); FindObjectOfType <FloppyDiskSpawner>().SpawnFloppyDisks(); PCManager.Instance.StartCoroutine(PCManager.Instance.LateStart()); this.gameObject.SetActive(false); }
private void OnEnable() { _textAnimation = DOTween.Sequence(); _textAnimation.Append(_text.DOText("", _animationVelocity, true, ScrambleMode.All).SetSpeedBased(true).SetEase(Ease.Linear).From()); _textAnimation.Join(_text.rectTransform.DOLocalMove((_text.rectTransform.localPosition / 2) * -1f, _animationVelocity).SetSpeedBased(true).SetEase(Ease.Linear)); _textAnimation.SetLoops(-1, LoopType.Restart); }
// Start is called before the first frame update void Start() { string str = "New Text <sprite=12_t index=0>."; str = "New Text <sprite name=\"Smiling face with smiling eyes\"> ."; TextMeshProUGUI textMeshProUGUI = GetComponent <TextMeshProUGUI>(); textMeshProUGUI.text = ""; textMeshProUGUI.DOText(str, 2).OnComplete(() => { Debug.Log("完成"); textMeshProUGUI.text = ""; textMeshProUGUI.ForceMeshUpdate(); string str1 = "New Text <sprite index=0> ."; textMeshProUGUI.DOText(str, 2).OnComplete(() => { Debug.Log("完成"); }); }); }
public async UniTask Play() { message.text = ""; _tween = message.DOText(_text, _text.Length * perTime) .SetEase(Ease.Linear); await _tween; }
public async UniTask ShowAsync(CancellationToken token) { await clearText .DOText($"clear", _animationTime) .SetEase(Ease.Linear) .WithCancellation(token); await UniTask.Delay(TimeSpan.FromSeconds(_animationTime), cancellationToken : token); }
private void DialogueContinue() { _alienText.DOText(_alienPhrases[_dialogueProgress], _alienPhrases[_dialogueProgress].Length / 80f, scrambleMode: ScrambleMode.Custom, scrambleChars: " ").SetEase(Ease.Linear).OnComplete(() => { _responseCanvasGroup.DOFade(1, 0.2f); _responseText.text = _responsePhrases[_dialogueProgress]; _dialogueProgress++; }); }
public async UniTask Play() { glyph.Invisible(); message.text = ""; _tween = message.DOText(_text, _text.Length * perTime) .SetEase(Ease.Linear); await _tween; glyph.Visible(); }
public void ShowClear() { stageText.enabled = true; ActivateLevelText(false); stageText.text = $""; DOTween.Sequence() .AppendInterval(CommonViewConfig.FADE_TIME) .Append(stageText .DOText($"game clear", CommonViewConfig.LOAD_INTERVAL * 0.5f) .SetEase(Ease.Linear)); _seController.DelayPlaySeAsync(SeType.GameClear, CommonViewConfig.FADE_TIME, _token).Forget(); }
public void Set() { delta.gameObject.SetActive(false); seq = DOTween.Sequence(); text = transform.Find("Text").GetComponentInChildren <TextMeshProUGUI>(); text.text = ""; string s = "時間を固定にしてしまうと、" + "文字数が少ないときと多いときで表示されるスピード感が全然ちがってしまうので、" + "文字数 × 1文字表示にかかる時間 という感じでやってます。"; seq.Append(text.DOText(s, s.Length * 0.05f).SetEase(Ease.Linear) .OnComplete(() => { delta.gameObject.SetActive(true); })); ; }
public void PopulateWithInfo(DialogueTree.DialogueNode node) { NodeText.text = ""; foreach (Transform t in OptionsContainer.transform) { Destroy(t.gameObject); } Name.text = node.Title; NodeText.DOText(node.Context, 0.8f); if (node.Options != null && node.Options.Count > 0) { foreach (DialogueTree.DialogueOption option in node.Options) { UIDialogueOption o = Instantiate(optionGo, OptionsContainer.transform).GetComponent <UIDialogueOption>(); o.NextNodeId = option.NodeId; o.Dialogue = this; o.PopulateWithInfo(option.Context); } } else { Exit(); } }
private void SetInfoText(string text) { InfoText.text = ""; InfoText.DOText(text, text.Length * 0.01f).SetEase(Ease.Linear).Play(); }
public void StartTuto() { text.DOText(Tutorials[index], 2.0f); }
public void StartCountdown() { DOTween.Sequence().Append(countdownText.DOText("3", 1)).Append(countdownText.DOText("2", 1)) .Append(countdownText.DOText("1", 1)).OnComplete(OnCountDownFinish); }
private void PlayAnimationOnce() { text.text = ""; text.DOText(loginText, speed / 2); }
public void NextIntroDialogue() { if (shouldNotAdvance) { return; } dialogueIndex++; dialogueCanvas.SetActive(true); dialogueTMP.text = ""; float cooldownDuration = 1.5f; continueText.SetActive(false); switch (dialogueIndex) { case 0: dialogueTMP.DOText("Finally moved into my own place!", 1f).SetEase(Ease.InSine); break; case 1: dialogueTMP.DOText("The first order of business is to get a kitty!", 1f).SetEase(Ease.InSine); break; case 2: dialogueTMP.DOText("Now...how do I get one...?", 1f).SetEase(Ease.InSine); break; case 3: dialogueTMP.DOText("Of course!", 0.5f).SetEase(Ease.InSine); break; case 4: dialogueTMP.DOText("I just need to collect 9 cat souls!", 1f).SetEase(Ease.InSine); break; case 5: dialogueTMP.DOText("But where to find them?", 1f).SetEase(Ease.InSine); break; case 6: dialogueTMP.DOText("...!", 1f).SetEase(Ease.InSine); FindObjectOfType <VirtualCameraController>().SwitchToVirtualCam(2); // Zoom into crystal ball ShowTinyRoom(); cooldownDuration = 2.5f; break; case 7: dialogueTMP.DOText("Ah! Thank you, Crystal Ball.", 1f).SetEase(Ease.InSine); break; case 8: dialogueTMP.DOText("An abandoned house would be purr-fect! Teehee!", 1f).SetEase(Ease.InSine); break; default: dialogueCanvas.SetActive(false); //Close dialogue box continueText.SetActive(false); GameManager.instance.LoadLevel(); //Load first level GameManager.instance.SetGameState(GameManager.GameState.gameStarting); //Reset index dialogueIndex = -1; break; } StartCoroutine(StoryCooldown(cooldownDuration)); }
public void UpdateCoinsAmount(int newCoinValue) { m_CoinsAmount.DOKill(); m_CoinsAmount.DOText("" + newCoinValue, 0.5f, false, ScrambleMode.Numerals, "0123456789"); }
private void DisplayAnswerText(TextMeshProUGUI displayText, string textToDisplay) { displayText.DOText(textToDisplay, animSpeed); }
public void DoText(string text) { Play(tmpText.DOText(text, Time, richTextEnabled, scrambleMode, scrambleChars)); }