Add duty free systems and travel stage updates
This commit is contained in:
@@ -29,11 +29,7 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
public float tutorialSpawnInterval = 2.2f; // 튜토리얼 발판 배치 간격
|
||||
private float timeBetSpawn; // 다음 배치까지의 시간 간격
|
||||
|
||||
private const float FallbackGroundY = -2.4f;
|
||||
private const float FallbackBasicSpacing = 0.58f;
|
||||
private const float FallbackActionSpacing = 0.72f;
|
||||
private const float FallbackLandingSpacing = 0.64f;
|
||||
private const float FallbackAerialSpacing = 2.05f;
|
||||
|
||||
public float yMin = -3.5f; // 배치할 위치의 최소 y값
|
||||
public float yMax = 1.5f; // 배치할 위치의 최대 y값
|
||||
@@ -64,8 +60,8 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
usePatternCourse = true;
|
||||
tutorialMode = mapDefinition.isTutorial;
|
||||
mapPlatformSkin = mapDefinition.platformSkin;
|
||||
tutorialSteps = CourseStepFactory.CloneSteps(mapDefinition.openingSteps);
|
||||
stagePatternSteps = CourseStepFactory.CloneSteps(mapDefinition.loopSteps);
|
||||
tutorialSteps = mapDefinition.GetOpeningSteps();
|
||||
stagePatternSteps = mapDefinition.GetLoopSteps();
|
||||
courseStepIndex = 0;
|
||||
courseSpawningStopped = false;
|
||||
pendingTutorialGuides.Clear();
|
||||
@@ -479,63 +475,19 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
}
|
||||
|
||||
private void EnsurePatternSteps() {
|
||||
EnsureTutorialSteps();
|
||||
EnsureStagePatternSteps();
|
||||
}
|
||||
CourseProfile fallbackProfile = tutorialMode
|
||||
? FallbackCourseProfile.CreateTutorialFallback()
|
||||
: FallbackCourseProfile.CreateGeneralFallback();
|
||||
|
||||
private void EnsureTutorialSteps() {
|
||||
if(tutorialSteps != null && tutorialSteps.Length > 0)
|
||||
if(tutorialSteps == null || tutorialSteps.Length == 0)
|
||||
{
|
||||
return;
|
||||
tutorialSteps = fallbackProfile.GetOpeningSteps();
|
||||
}
|
||||
|
||||
tutorialSteps = new CourseStep[] {
|
||||
CreateTutorialStep(CourseStepKind.Jump, Platform.PlatformPattern.LowMid, Platform.MileagePattern.JumpArc, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackActionSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackLandingSpacing),
|
||||
CreateTutorialStep(CourseStepKind.DoubleJumpTakeoff, Platform.PlatformPattern.Empty, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackAerialSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackLandingSpacing),
|
||||
CreateTutorialStep(CourseStepKind.Slide, Platform.PlatformPattern.Slide, Platform.MileagePattern.SlideLine, SlideObstaclePattern.SlideLayout.CenterPair, FallbackGroundY, FallbackActionSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackLandingSpacing),
|
||||
CreateTutorialStep(CourseStepKind.ForceHit, Platform.PlatformPattern.ForceHit, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.WidePair, FallbackGroundY, FallbackActionSpacing),
|
||||
CreateTutorialStep(CourseStepKind.HealthItem, Platform.PlatformPattern.Empty, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackLandingSpacing, Platform.ItemPattern.HealthSushi),
|
||||
CreateTutorialStep(CourseStepKind.InvincibleItem, Platform.PlatformPattern.Empty, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing, Platform.ItemPattern.InvincibleRamen),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.ForceHit, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.WidePair, FallbackGroundY, FallbackActionSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackLandingSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing),
|
||||
CreateTutorialStep(CourseStepKind.ShieldItem, Platform.PlatformPattern.Empty, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing, Platform.ItemPattern.Shield),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.ForceHit, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.WidePair, FallbackGroundY, FallbackActionSpacing),
|
||||
CreateTutorialStep(CourseStepKind.MileageCardItem, Platform.PlatformPattern.Empty, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing, Platform.ItemPattern.MileageCard),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.ForceHit, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.WidePair, FallbackGroundY, FallbackActionSpacing),
|
||||
CreateTutorialStep(CourseStepKind.SpeedItem, Platform.PlatformPattern.Empty, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing, Platform.ItemPattern.SpeedShoes),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing),
|
||||
CreateTutorialStep(CourseStepKind.None, Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, FallbackGroundY, FallbackBasicSpacing),
|
||||
};
|
||||
}
|
||||
|
||||
private void EnsureStagePatternSteps() {
|
||||
if(stagePatternSteps != null && stagePatternSteps.Length > 0)
|
||||
if(stagePatternSteps == null || stagePatternSteps.Length == 0)
|
||||
{
|
||||
return;
|
||||
stagePatternSteps = fallbackProfile.GetLoopSteps();
|
||||
}
|
||||
|
||||
stagePatternSteps = new CourseStep[] {
|
||||
CreateStep(Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackBasicSpacing, "", ""),
|
||||
CreateStep(Platform.PlatformPattern.LowMid, Platform.MileagePattern.JumpArc, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Jump),
|
||||
CreateStep(Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackLandingSpacing, "", ""),
|
||||
CreateStep(Platform.PlatformPattern.Slide, Platform.MileagePattern.SlideLine, SlideObstaclePattern.SlideLayout.WidePair, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Slide),
|
||||
CreateStep(Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackBasicSpacing, "", ""),
|
||||
CreateStep(Platform.PlatformPattern.LowLeft, Platform.MileagePattern.JumpArc, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Jump),
|
||||
CreateStep(Platform.PlatformPattern.Slide, Platform.MileagePattern.SlideLine, SlideObstaclePattern.SlideLayout.LeftPair, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Slide),
|
||||
CreateStep(Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackBasicSpacing, "", ""),
|
||||
CreateStep(Platform.PlatformPattern.LowRight, Platform.MileagePattern.JumpArc, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Jump),
|
||||
CreateStep(Platform.PlatformPattern.Empty, Platform.MileagePattern.None, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackAerialSpacing, "", ""),
|
||||
CreateStep(Platform.PlatformPattern.Slide, Platform.MileagePattern.SlideLine, SlideObstaclePattern.SlideLayout.RightPair, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Slide),
|
||||
CreateStep(Platform.PlatformPattern.LowMid, Platform.MileagePattern.JumpArc, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Jump),
|
||||
CreateStep(Platform.PlatformPattern.Empty, Platform.MileagePattern.SafeLine, SlideObstaclePattern.SlideLayout.Random, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackBasicSpacing, "", ""),
|
||||
CreateStep(Platform.PlatformPattern.Slide, Platform.MileagePattern.SlideLine, SlideObstaclePattern.SlideLayout.CenterPair, GameManager.TutorialGuideType.None, FallbackGroundY, FallbackActionSpacing, "", "", Platform.ItemPattern.None, CoursePlatformType.Slide),
|
||||
};
|
||||
}
|
||||
|
||||
private CourseStep CreateStep(
|
||||
@@ -563,99 +515,4 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
return step;
|
||||
}
|
||||
|
||||
private CourseStep CreateTutorialStep(
|
||||
CourseStepKind stepKind,
|
||||
Platform.PlatformPattern platformPattern,
|
||||
Platform.MileagePattern mileagePattern,
|
||||
SlideObstaclePattern.SlideLayout slideLayout,
|
||||
float yPosition,
|
||||
float spawnInterval,
|
||||
Platform.ItemPattern itemPattern = Platform.ItemPattern.None) {
|
||||
GameManager.TutorialGuideType guideType = GameManager.TutorialGuideType.None;
|
||||
string title = "";
|
||||
string message = "";
|
||||
|
||||
switch(stepKind)
|
||||
{
|
||||
case CourseStepKind.Jump:
|
||||
guideType = GameManager.TutorialGuideType.Jump;
|
||||
title = "점프";
|
||||
message = "가방 장애물이 보이면 왼쪽 클릭으로 뛰어넘습니다.";
|
||||
break;
|
||||
case CourseStepKind.DoubleJumpTakeoff:
|
||||
guideType = GameManager.TutorialGuideType.DoubleJump;
|
||||
title = "2단 점프";
|
||||
message = "다음 발판이 멀리 있으면 공중에서 한 번 더 왼쪽 클릭합니다.";
|
||||
break;
|
||||
case CourseStepKind.Slide:
|
||||
guideType = GameManager.TutorialGuideType.Slide;
|
||||
title = "슬라이드";
|
||||
message = "천장 표지판이 보이면 오른쪽 클릭을 누르고 지나갑니다.";
|
||||
break;
|
||||
case CourseStepKind.ForceHit:
|
||||
guideType = GameManager.TutorialGuideType.Damage;
|
||||
title = "피격";
|
||||
message = "이번 구간은 일부러 맞아 목숨과 속도 감소를 확인합니다.";
|
||||
break;
|
||||
case CourseStepKind.HealthItem:
|
||||
guideType = GameManager.TutorialGuideType.Items;
|
||||
title = "초밥";
|
||||
message = "초밥을 먹으면 잃은 목숨을 1 회복합니다.";
|
||||
break;
|
||||
case CourseStepKind.InvincibleItem:
|
||||
guideType = GameManager.TutorialGuideType.Items;
|
||||
title = "라멘";
|
||||
message = "라멘을 먹고 다음 충돌을 피해 없이 지나가 봅니다.";
|
||||
break;
|
||||
case CourseStepKind.ShieldItem:
|
||||
guideType = GameManager.TutorialGuideType.Items;
|
||||
title = "방어막";
|
||||
message = "방어막을 먹고 다음 충돌 1회를 막아 봅니다.";
|
||||
break;
|
||||
case CourseStepKind.SpeedItem:
|
||||
guideType = GameManager.TutorialGuideType.Items;
|
||||
title = "운동화";
|
||||
message = "운동화는 속도를 회복해 일정이 늦어지는 것을 줄입니다.";
|
||||
break;
|
||||
case CourseStepKind.MileageCardItem:
|
||||
guideType = GameManager.TutorialGuideType.Items;
|
||||
title = "마일리지 카드";
|
||||
message = "카드를 먹은 뒤 마일리지를 모으면 획득량이 늘어납니다.";
|
||||
break;
|
||||
}
|
||||
|
||||
return CreateStep(
|
||||
platformPattern,
|
||||
mileagePattern,
|
||||
slideLayout,
|
||||
guideType,
|
||||
yPosition,
|
||||
spawnInterval,
|
||||
title,
|
||||
message,
|
||||
itemPattern,
|
||||
GetCoursePlatformType(stepKind, platformPattern, yPosition));
|
||||
}
|
||||
|
||||
private CoursePlatformType GetCoursePlatformType(CourseStepKind stepKind, Platform.PlatformPattern platformPattern, float yPosition) {
|
||||
if(stepKind == CourseStepKind.ForceHit || platformPattern == Platform.PlatformPattern.ForceHit)
|
||||
{
|
||||
return CoursePlatformType.ForceHit;
|
||||
}
|
||||
|
||||
if(stepKind == CourseStepKind.Slide || platformPattern == Platform.PlatformPattern.Slide)
|
||||
{
|
||||
return CoursePlatformType.Slide;
|
||||
}
|
||||
|
||||
if(stepKind == CourseStepKind.Jump
|
||||
|| platformPattern == Platform.PlatformPattern.LowLeft
|
||||
|| platformPattern == Platform.PlatformPattern.LowMid
|
||||
|| platformPattern == Platform.PlatformPattern.LowRight)
|
||||
{
|
||||
return CoursePlatformType.Jump;
|
||||
}
|
||||
|
||||
return CoursePlatformType.Basic;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user