Tune tutorial coin arcs and finish flow
This commit is contained in:
@@ -60,6 +60,8 @@ public class Platform : MonoBehaviour {
|
||||
private const float MileageColliderRadius = 0.4f;
|
||||
private const float ItemTokenScale = 0.68f;
|
||||
private const float ItemColliderRadius = 0.46f;
|
||||
private const float JumpMileageMinWidthScale = 1.8f;
|
||||
private const float JumpMileageMaxWidthScale = 2.5f;
|
||||
|
||||
public void ConfigureForTutorial(
|
||||
PlatformPattern pattern,
|
||||
@@ -619,15 +621,29 @@ public class Platform : MonoBehaviour {
|
||||
}
|
||||
|
||||
private void PlaceJumpMileageArc(float obstacleX) {
|
||||
float widthScale = GetJumpMileageArcWidthScale();
|
||||
Vector2[] positions = {
|
||||
new Vector2(obstacleX - 1.2f, 1.65f),
|
||||
new Vector2(obstacleX, 2.25f),
|
||||
new Vector2(obstacleX + 1.2f, 1.65f),
|
||||
new Vector2(obstacleX + 1.9f, 1.35f)
|
||||
new Vector2(obstacleX - 2.25f * widthScale, 1.88f),
|
||||
new Vector2(obstacleX - 1.15f * widthScale, 2.88f),
|
||||
new Vector2(obstacleX, 3.58f),
|
||||
new Vector2(obstacleX + 1.15f * widthScale, 2.88f),
|
||||
new Vector2(obstacleX + 2.25f * widthScale, 1.88f)
|
||||
};
|
||||
|
||||
PlaceMileageTokens(positions, smallMileageValue);
|
||||
SetPickupValue(1, bonusMileageValue);
|
||||
SetPickupValue(2, bonusMileageValue);
|
||||
}
|
||||
|
||||
private float GetJumpMileageArcWidthScale() {
|
||||
if(GameManager.instance == null)
|
||||
{
|
||||
return JumpMileageMinWidthScale;
|
||||
}
|
||||
|
||||
float minSpeed = Mathf.Max(0.1f, GameManager.instance.minGameSpeed);
|
||||
float maxSpeed = Mathf.Max(minSpeed + 0.1f, GameManager.instance.maxGameSpeed);
|
||||
float speedProgress = Mathf.InverseLerp(minSpeed, maxSpeed, GameManager.instance.gameSpeed);
|
||||
return Mathf.Lerp(JumpMileageMinWidthScale, JumpMileageMaxWidthScale, speedProgress);
|
||||
}
|
||||
|
||||
private void PlaceSlideMileageLine() {
|
||||
|
||||
Reference in New Issue
Block a user