Tune tutorial coin arcs and finish flow
This commit is contained in:
@@ -84,6 +84,8 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
private int courseStepIndex = 0; // 진행 중인 패턴 코스 순번
|
||||
private Platform.PlatformSkin mapPlatformSkin = Platform.PlatformSkin.Airport; // 현재 맵에서 사용할 발판 스킨
|
||||
private readonly List<PendingTutorialGuide> pendingTutorialGuides = new List<PendingTutorialGuide>(); // 실제 체험 직전에 띄울 설명들
|
||||
private GameObject activeFinishLandingPlatform; // 도착 게이트가 공중에 뜨지 않도록 깔아두는 전용 발판
|
||||
private bool courseSpawningStopped = false; // 도착 게이트 뒤로 새 발판/장애물이 나오지 않게 막는다.
|
||||
|
||||
private Vector2 poolPosition = new Vector2(0, -25); // 초반에 생성된 발판들을 화면 밖에 숨겨둘 위치
|
||||
private float lastSpawnTime; // 마지막 배치 시점
|
||||
@@ -100,7 +102,9 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
tutorialSteps = MapDatabase.CloneSteps(mapDefinition.openingSteps);
|
||||
stagePatternSteps = MapDatabase.CloneSteps(mapDefinition.loopSteps);
|
||||
courseStepIndex = 0;
|
||||
courseSpawningStopped = false;
|
||||
pendingTutorialGuides.Clear();
|
||||
ClearFinishLandingPlatform();
|
||||
ResetPoolIndices();
|
||||
lastSpawnTime = Time.time;
|
||||
timeBetSpawn = 0f;
|
||||
@@ -109,6 +113,46 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
DeactivateAllPlatformPools();
|
||||
}
|
||||
|
||||
public void SpawnFinishLandingPlatform(float spawnX, float groundY) {
|
||||
if(platformPrefab == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ClearFinishLandingPlatform();
|
||||
activeFinishLandingPlatform = Instantiate(platformPrefab, poolPosition, Quaternion.identity);
|
||||
activeFinishLandingPlatform.SetActive(false);
|
||||
|
||||
TutorialStep landingStep = CreateStep(
|
||||
Platform.PlatformPattern.Empty,
|
||||
Platform.MileagePattern.None,
|
||||
SlideObstaclePattern.SlideLayout.Random,
|
||||
GameManager.TutorialGuideType.None,
|
||||
Mathf.Clamp(groundY, yMin, yMax),
|
||||
FallbackLandingSpacing,
|
||||
"",
|
||||
"",
|
||||
Platform.ItemPattern.None,
|
||||
CoursePlatformType.Basic);
|
||||
|
||||
ConfigurePlatform(activeFinishLandingPlatform, landingStep);
|
||||
activeFinishLandingPlatform.transform.position = new Vector2(spawnX, landingStep.yPosition);
|
||||
activeFinishLandingPlatform.SetActive(true);
|
||||
}
|
||||
|
||||
public void ClearFinishLandingPlatform() {
|
||||
if(activeFinishLandingPlatform != null)
|
||||
{
|
||||
Destroy(activeFinishLandingPlatform);
|
||||
activeFinishLandingPlatform = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void StopCourseSpawningAfterFinishGate() {
|
||||
courseSpawningStopped = true;
|
||||
pendingTutorialGuides.Clear();
|
||||
}
|
||||
|
||||
void Start() {
|
||||
EnsurePatternSteps();
|
||||
|
||||
@@ -205,6 +249,11 @@ public class PlatformSpawner : MonoBehaviour {
|
||||
return;
|
||||
}
|
||||
|
||||
if(courseSpawningStopped)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdatePendingTutorialGuides();
|
||||
if(GameManager.instance != null && GameManager.instance.IsTutorialGuidePaused)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user