コード例 #1
0
ファイル: TestPlayer.cs プロジェクト: Omadel/Ludum-Dare-48
 // Update is called once per frame
 private void Update()
 {
     if (Input.GetKey(KeyCode.Space) || Input.touchCount > 0)
     {
         text.text = (int.Parse(text.text) + 1).ToString();
         text.transform.DOComplete();
         text.DOComplete();
         text.transform.DOShakePosition(.3f, 3f);
         text.transform.DOShakeRotation(.3f, 3f);
         text.transform.DOPunchScale(Vector3.one * .2f, .3f);
         text.DOColor(Color.grey, .1f).SetLoops(2, LoopType.Yoyo);
     }
 }
コード例 #2
0
    private void OnNewBlockTouched()
    {
        currentComboCooldown = comboCooldown;

        comboLabel.transform.DOKill(true);
        comboLabel.DOKill(false); //Kill the previous color tween
        // comboLabel.transform.localScale = Vector3.one;
        comboCounter++;
        comboLabel.text = $"COMBO {comboCounter}";

        // comboLabel.transform.DOPunchScale(Vector3.one * .2f, .2f, 1, .1f);

        comboLabel.transform.DOShakePosition(.2f, shakeStrength, shakeVibrato, shakeRandomness, false, false);
        comboLabel.DOColor(comboLabelGradient.Evaluate(comboCounter / 100f), .2f);
    }
コード例 #3
0
    IEnumerator CoStart()
    {
        _intro_parent.SetActive(true);
        _teamNameLabel.color        = new Color(1f, 1f, 1f, 0f);
        _char.color                 = new Color(1f, 1f, 1f, 0f);
        _char2.color                = new Color(1f, 1f, 1f, 0f);
        _mates.color                = new Color(1f, 1f, 1f, 0f);
        _bg.transform.localPosition = new Vector3(996f, 0f, 0f);
        _bgsprite.color             = new Color(1f, 1f, 1f, 0f);
        yield return(new WaitForSeconds(0.4f));

        yield return(_mates.DOFade(1f, 1.2f).WaitForCompletion(false));

        yield return(new WaitForSeconds(1f));

        yield return(_mates.DOFade(0f, 0.4f).WaitForCompletion(false));

        yield return(_teamNameLabel.DOFade(1f, 0.3f).WaitForCompletion(false));

        yield return(new WaitForSeconds(1.2f));

        yield return(_teamNameLabel.DOFade(0f, 0.7f).WaitForCompletion(false));

        _titleLable.color = new Color(1f, 1f, 1f, 0f);
        _title_parent.SetActive(true);
        _intro_parent.SetActive(false);
        yield return(_titleLable.DOFade(1f, 1f).WaitForCompletion(false));

        yield return(_char.DOFade(1f, 0.8f).WaitForCompletion(false));

        yield return(_char2.DOFade(1f, 0.4f).WaitForCompletion(false));

        yield return(_titleLable.DOColor(new Color(0.9f, 0.4f, 0.4f), 1f).WaitForCompletion(false));

        _bgsprite.DOFade(1f, 0.4f).WaitForCompletion(false);
        _bg.DOMove(new Vector3(-4548f, 0f, 0f), 100f);
        _pressButton.SetActive(true);
        _pressButtonLable.DOFade(1f, 1f).CompletedLoops();

        _isUpdateCheck = true;
        CurState       = State.Title;
        yield break;
    }
コード例 #4
0
    void colorText(TMPro.TextMeshProUGUI txt)
    {
        txt.color = GameManager.instance.colorList[5];

        colorSequence = DOTween.Sequence();
        colorSequence.Append(txt.DOColor(GameManager.instance.colorList[0], colorChangeTime))
        .AppendCallback(() => { txt.color = GameManager.instance.colorList[0]; })
        .Append(txt.DOColor(GameManager.instance.colorList[1], colorChangeTime))
        .AppendCallback(() => { txt.color = GameManager.instance.colorList[1]; })
        .Append(txt.DOColor(GameManager.instance.colorList[2], colorChangeTime))
        .AppendCallback(() => { txt.color = GameManager.instance.colorList[2]; })
        .Append(txt.DOColor(GameManager.instance.colorList[3], colorChangeTime))
        .AppendCallback(() => { txt.color = GameManager.instance.colorList[3]; })
        .Append(txt.DOColor(GameManager.instance.colorList[4], colorChangeTime))
        .AppendCallback(() => { txt.color = GameManager.instance.colorList[4]; })
        .Append(txt.DOColor(GameManager.instance.colorList[5], colorChangeTime))
        .AppendCallback(() => { txt.color = GameManager.instance.colorList[5]; }).SetLoops(-1);
    }
コード例 #5
0
ファイル: FadeText.cs プロジェクト: Jenoah/UnityScripts
 public void FadeToTarget(float fadeSpeed)
 {
     textObject.DOColor(targetColor, fadeSpeed).SetUpdate(true);
 }