Build TravelRun intro and tutorial flow

This commit is contained in:
jongjae0305
2026-07-06 16:15:20 +09:00
parent af26dd4311
commit 2ba3882f1b
153 changed files with 13625 additions and 2086 deletions
@@ -0,0 +1,47 @@
using UnityEngine;
public class FlowIntroStampMotion : MonoBehaviour
{
private const float Duration = 0.18f;
private RectTransform rectTransform;
private Vector3 baseScale = Vector3.one;
private float startTime = -1f;
private void Awake()
{
rectTransform = GetComponent<RectTransform>();
if(rectTransform != null)
{
baseScale = rectTransform.localScale;
}
}
public void Play()
{
if(rectTransform == null)
{
rectTransform = GetComponent<RectTransform>();
}
if(rectTransform != null)
{
baseScale = Vector3.one;
rectTransform.localScale = baseScale * 1.42f;
}
startTime = Time.unscaledTime;
}
private void Update()
{
if(rectTransform == null || startTime < 0f)
{
return;
}
float t = Mathf.Clamp01((Time.unscaledTime - startTime) / Duration);
float scale = Mathf.Lerp(1.42f, 1f, 1f - Mathf.Pow(1f - t, 3f));
rectTransform.localScale = baseScale * scale;
}
}