1. DOJump
using UnityEngine;
using DG.Tweening;
public class SpriteFade : MonoBehaviour
{
void Start()
{
transform.DOJump(
new Vector3(5f, 0f, 0f), // 목표 위치
4f, // 점프 높이
3, // 점프 횟수
5f // 총 시간
).SetEase(Ease.InQuad);
}
}
2. DOText
- ScrambleMode.None : 섞는 효과 없음 (기본값)
- ScrambleMode.All : 모든 문자 종류 섞기
- ScrambleMode.Uppercase : 대문자만 섞기 (A, B, C, ...)
- ScrambleMode.Lowercase : 소문자만 섞기 (a, b, c, ...)
- ScrambleMode.Numerals : 숫자만 섞기 (0, 1, 2, ...)
- ScrambleMode.Custom : 직접 문자 집합 지정 가능
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
public class SpriteFade : MonoBehaviour
{
public Text uiText;
void Start()
{
uiText.DOText("하늘로 <color=red>가는</color> 상자 눈 앞에 보여", 2f); // 2초 동안 글자가 하나씩 출력됨
}
}
ScrambleMode.All
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
public class SpriteFade : MonoBehaviour
{
public Text uiText;
void Start()
{
uiText.DOText("하늘로 <color=red>가는</color> 상자 눈 앞에 보여", 2f, true, ScrambleMode.All);
}
}
ScrambleMode.Custom
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
public class SpriteFade : MonoBehaviour
{
public Text uiText;
void Start()
{
string A = "봄여름가을겨울10";
uiText.DOText("하늘로 <color=red>가는</color> 상자 눈 앞에 보여", 10f, true, ScrambleMode.Custom, A);
}
}
'DOTWeen' 카테고리의 다른 글
DOTWeen: DOShakePosition, DOShakeRotation, DOShakeScale (0) | 2025.07.20 |
---|---|
DOTWeen: DOFade, DOColor (0) | 2025.07.20 |
DOTWeen: Ease4 Flash (0) | 2025.07.20 |
DOTWeen: Ease3 탄성 (0) | 2025.07.20 |
DOTWeen: Ease2 함수 사용 (0) | 2025.07.19 |