Refactor course maps and travel UI

This commit is contained in:
jongjae0305
2026-07-07 15:57:11 +09:00
parent 74498dcf87
commit a708f18499
37 changed files with 1983 additions and 1633 deletions
+40 -39
View File
@@ -86,7 +86,7 @@ public class GameManager : MonoBehaviour {
private const string TotalMileageKey = "UniRun.TotalMileage";
private const string InitialMileageGrantedKey = "UniRun.InitialMileageGranted";
private const string CharacterFaceResourcePath = "UI_JJ_PassportPhoto";
private const string PassportPanelResourcePath = "UI_LeftHudPassportHorizontalGridPanel";
private const string PassportPanelResourcePath = "UI_LeftHudPassportCompactPanel";
private const string LifeStampResourcePath = "UI_LifeStamp";
private const string PassportItemSlotResourcePath = "UI_PassportItemSlot";
private const string TutorialGuideFrameResourcePath = "UI_TutorialAirportMonitorFrame";
@@ -95,7 +95,7 @@ public class GameManager : MonoBehaviour {
private const string RightHudLuggageLabelJapanResourcePath = "UI_RightHudLuggageLabel_Japan";
private const string RightHudLuggageLabelChinaResourcePath = "UI_RightHudLuggageLabel_China";
private const string RightHudLuggageLabelAmericaResourcePath = "UI_RightHudLuggageLabel_America";
private const float PassportHudWidth = 320f;
private const float PassportHudWidth = 261f;
private const float PassportHudHeight = 102f;
private const float PassportHudScale = 0.5f;
private const float RightInfoHudWidth = 260f;
@@ -383,7 +383,7 @@ public class GameManager : MonoBehaviour {
for(int i = 0; i < currentMapDefinition.openingSteps.Length; i++)
{
PlatformSpawner.TutorialStep step = currentMapDefinition.openingSteps[i];
CourseStep step = currentMapDefinition.openingSteps[i];
if(step != null
&& (step.guideType != TutorialGuideType.None
|| !string.IsNullOrEmpty(step.title)
@@ -436,7 +436,7 @@ public class GameManager : MonoBehaviour {
SetTutorialGuide(TutorialGuideType.Slide, "슬라이드", "오른쪽 클릭을 누르고 있으면 낮게 지나갑니다.");
break;
case 3:
SetTutorialGuide(TutorialGuideType.Items, "아이템", "초밥 -> 라멘 -> 방어막 -> 운동화 -> 마일리지 카드 순서입니다.");
SetTutorialGuide(TutorialGuideType.Items, "아이템", "초밥 -> 라멘 -> 방어막 -> 마일리지 카드 -> 운동화 순서입니다.");
break;
default:
tutorialGuideSequenceComplete = true;
@@ -795,24 +795,24 @@ public class GameManager : MonoBehaviour {
}
private void UpdateTutorialTextLayout(bool showItemRow, bool showFullText) {
Vector2 textPosition = new Vector2(104f, -38f);
Vector2 textSize = new Vector2(250f, 20f);
Vector2 bodyPosition = new Vector2(104f, -60f);
Vector2 bodySize = new Vector2(250f, 38f);
Vector2 textPosition = new Vector2(118f, -38f);
Vector2 textSize = new Vector2(236f, 20f);
Vector2 bodyPosition = new Vector2(118f, -60f);
Vector2 bodySize = new Vector2(236f, 38f);
if(showItemRow)
{
textPosition = new Vector2(110f, -38f);
textSize = new Vector2(242f, 20f);
bodyPosition = new Vector2(110f, -60f);
bodySize = new Vector2(242f, 38f);
textPosition = new Vector2(124f, -38f);
textSize = new Vector2(228f, 20f);
bodyPosition = new Vector2(124f, -60f);
bodySize = new Vector2(228f, 38f);
}
else if(showFullText)
{
textPosition = new Vector2(54f, -39f);
textSize = new Vector2(284f, 20f);
bodyPosition = new Vector2(54f, -61f);
bodySize = new Vector2(284f, 39f);
textPosition = new Vector2(68f, -39f);
textSize = new Vector2(270f, 20f);
bodyPosition = new Vector2(68f, -61f);
bodySize = new Vector2(270f, 39f);
}
if(tutorialTitleText != null)
@@ -1006,7 +1006,7 @@ public class GameManager : MonoBehaviour {
frameRect.anchorMin = new Vector2(0f, 1f);
frameRect.anchorMax = new Vector2(0f, 1f);
frameRect.pivot = new Vector2(0f, 1f);
frameRect.anchoredPosition = new Vector2(30f, -20f);
frameRect.anchoredPosition = new Vector2(32f, -20f);
frameRect.sizeDelta = new Vector2(72f, 68f);
Image frameImage = faceFrame.GetComponent<Image>();
@@ -1045,8 +1045,8 @@ public class GameManager : MonoBehaviour {
lifeRect.anchorMin = new Vector2(0f, 1f);
lifeRect.anchorMax = new Vector2(0f, 1f);
lifeRect.pivot = new Vector2(0f, 1f);
lifeRect.anchoredPosition = new Vector2(124f + (i * 44f), -20f);
lifeRect.sizeDelta = new Vector2(30f, 30f);
lifeRect.anchoredPosition = new Vector2(125f + (i * 45f), -23f);
lifeRect.sizeDelta = new Vector2(28f, 28f);
Image lifeImage = lifeObject.GetComponent<Image>();
lifeImage.sprite = lifeSprite;
@@ -1071,15 +1071,15 @@ public class GameManager : MonoBehaviour {
slotRect.anchorMin = new Vector2(0f, 1f);
slotRect.anchorMax = new Vector2(0f, 1f);
slotRect.pivot = new Vector2(0f, 1f);
slotRect.anchoredPosition = new Vector2(118f + (i * 46f), -66f);
slotRect.sizeDelta = new Vector2(40f, 24f);
slotRect.anchoredPosition = new Vector2(125f + (i * 45f), -62f);
slotRect.sizeDelta = new Vector2(30f, 30f);
Image slotImage = slotObject.GetComponent<Image>();
slotImage.sprite = slotSprite;
slotImage.color = slotSprite != null
? new Color(1f, 1f, 1f, 0.62f)
: new Color(0.92f, 0.97f, 1f, 0.22f);
slotImage.preserveAspect = false;
slotImage.preserveAspect = true;
slotImage.raycastTarget = false;
}
}
@@ -1140,8 +1140,8 @@ public class GameManager : MonoBehaviour {
CreateTutorialMainImage(tutorialGuideObject.transform);
CreateTutorialItemRow(tutorialGuideObject.transform);
tutorialTitleText = CreateTutorialText(tutorialGuideObject.transform, "Tutorial Title", new Vector2(104f, -38f), new Vector2(250f, 20f), 12f, FontStyles.Bold);
tutorialBodyText = CreateTutorialText(tutorialGuideObject.transform, "Tutorial Body", new Vector2(104f, -60f), new Vector2(250f, 38f), 9f, FontStyles.Normal);
tutorialTitleText = CreateTutorialText(tutorialGuideObject.transform, "Tutorial Title", new Vector2(118f, -38f), new Vector2(236f, 20f), 12f, FontStyles.Bold);
tutorialBodyText = CreateTutorialText(tutorialGuideObject.transform, "Tutorial Body", new Vector2(118f, -60f), new Vector2(236f, 38f), 9f, FontStyles.Normal);
tutorialTitleText.color = new Color(0.06f, 0.13f, 0.19f, 0.98f);
tutorialBodyText.color = new Color(0.10f, 0.18f, 0.23f, 0.95f);
CreateTutorialNextButton(tutorialGuideObject.transform);
@@ -1170,16 +1170,18 @@ public class GameManager : MonoBehaviour {
multiplierRect.anchorMin = new Vector2(1f, 0f);
multiplierRect.anchorMax = new Vector2(1f, 0f);
multiplierRect.pivot = new Vector2(1f, 0f);
multiplierRect.anchoredPosition = new Vector2(-2f, 1f);
multiplierRect.sizeDelta = new Vector2(22f, 15f);
multiplierRect.anchoredPosition = new Vector2(8f, -4f);
multiplierRect.sizeDelta = new Vector2(42f, 28f);
tutorialMultiplierText = multiplierObject.AddComponent<TextMeshProUGUI>();
tutorialMultiplierText.font = scoreText.font;
tutorialMultiplierText.text = "x2";
tutorialMultiplierText.text = "X2";
tutorialMultiplierText.alignment = TextAlignmentOptions.Center;
tutorialMultiplierText.fontSize = 9f;
tutorialMultiplierText.fontSize = 17f;
tutorialMultiplierText.fontStyle = FontStyles.Bold;
tutorialMultiplierText.color = new Color(1f, 0.91f, 0.33f, 1f);
tutorialMultiplierText.outlineColor = new Color(0.05f, 0.05f, 0.06f, 0.95f);
tutorialMultiplierText.outlineWidth = 0.18f;
tutorialMultiplierText.raycastTarget = false;
tutorialMultiplierText.textWrappingMode = TextWrappingModes.NoWrap;
tutorialMultiplierText.gameObject.SetActive(false);
@@ -1326,7 +1328,7 @@ public class GameManager : MonoBehaviour {
if(guideType == TutorialGuideType.Slide)
{
return LoadTutorialSprite("Assets/Sprites/JJ_Slide.png", "JJ_Slide_0");
return LoadTutorialSprite("Assets/Sprites/JJ_Slide.png", "JJ_Slide_2");
}
if(guideType == TutorialGuideType.Damage)
@@ -1519,7 +1521,7 @@ public class GameManager : MonoBehaviour {
float cursor = 0f;
AddStepMarkers(mapDefinition.openingSteps, ref cursor, targetDistance);
PlatformSpawner.TutorialStep[] loopSteps = mapDefinition.loopSteps;
CourseStep[] loopSteps = mapDefinition.loopSteps;
int loopGuard = 0;
while(cursor < targetDistance
&& loopSteps != null
@@ -1532,7 +1534,7 @@ public class GameManager : MonoBehaviour {
}
}
private void AddStepMarkers(PlatformSpawner.TutorialStep[] steps, ref float cursor, float targetDistance) {
private void AddStepMarkers(CourseStep[] steps, ref float cursor, float targetDistance) {
if(steps == null)
{
return;
@@ -1540,7 +1542,7 @@ public class GameManager : MonoBehaviour {
for(int i = 0; i < steps.Length; i++)
{
PlatformSpawner.TutorialStep step = steps[i];
CourseStep step = steps[i];
float stepDistance = GetStepDistance(step);
if(markerObjects.Count < MaxCourseObjectCount)
@@ -1564,7 +1566,7 @@ public class GameManager : MonoBehaviour {
}
}
private float GetStepDistance(PlatformSpawner.TutorialStep step) {
private float GetStepDistance(CourseStep step) {
if(step == null)
{
return CourseDistancePerInterval;
@@ -1573,7 +1575,7 @@ public class GameManager : MonoBehaviour {
return Mathf.Max(0.3f, step.spawnInterval) * CourseDistancePerInterval;
}
private bool TryGetMarkerInfo(PlatformSpawner.TutorialStep step, out MarkerInfo markerInfo) {
private bool TryGetMarkerInfo(CourseStep step, out MarkerInfo markerInfo) {
markerInfo = new MarkerInfo();
if(step == null)
@@ -1589,7 +1591,7 @@ public class GameManager : MonoBehaviour {
return true;
}
if(step.coursePlatformType == PlatformSpawner.CoursePlatformType.ForceHit
if(step.coursePlatformType == CoursePlatformType.ForceHit
|| step.platformPattern == Platform.PlatformPattern.ForceHit)
{
markerInfo.label = "!";
@@ -1606,7 +1608,7 @@ public class GameManager : MonoBehaviour {
return true;
}
if(step.coursePlatformType == PlatformSpawner.CoursePlatformType.Slide
if(step.coursePlatformType == CoursePlatformType.Slide
|| step.platformPattern == Platform.PlatformPattern.Slide)
{
markerInfo.label = "S";
@@ -1615,7 +1617,7 @@ public class GameManager : MonoBehaviour {
return true;
}
if(step.coursePlatformType == PlatformSpawner.CoursePlatformType.Jump
if(step.coursePlatformType == CoursePlatformType.Jump
|| step.platformPattern == Platform.PlatformPattern.LowLeft
|| step.platformPattern == Platform.PlatformPattern.LowMid
|| step.platformPattern == Platform.PlatformPattern.LowRight)
@@ -1652,7 +1654,7 @@ public class GameManager : MonoBehaviour {
markerObjects.Add(platformImage.gameObject);
}
private Color GetPlatformColor(PlatformSpawner.TutorialStep step) {
private Color GetPlatformColor(CourseStep step) {
if(step != null && step.spawnInterval >= 1.4f)
{
return new Color(0.28f, 0.50f, 0.57f, 0.96f);
@@ -1671,7 +1673,6 @@ public class GameManager : MonoBehaviour {
if(markerInfo.kind == "ForceHit")
{
CreateJumpFeature(progress, markerInfo);
CreateSlideFeature(progress, markerInfo);
return;
}