47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using System;
|
|
|
|
[Serializable]
|
|
public class MapDefinition {
|
|
public MapId mapId;
|
|
public string displayName;
|
|
public string routeName;
|
|
public bool isTutorial;
|
|
public Platform.PlatformSkin platformSkin;
|
|
public string backgroundResourcePath;
|
|
public string[] backgroundResourcePaths;
|
|
public float backgroundFitScaleMultiplier = 1f;
|
|
public float backgroundVerticalOffset = 0f;
|
|
public FinishGateStyle finishGateStyle;
|
|
public float targetDistance;
|
|
public float timeLimit;
|
|
public int clearMileageReward;
|
|
public bool hasNextMap;
|
|
public MapId nextMapId;
|
|
public CourseProfile courseProfile;
|
|
public CourseStep[] openingSteps;
|
|
public CourseStep[] loopSteps;
|
|
|
|
public CourseStep[] GetOpeningSteps() {
|
|
return courseProfile != null
|
|
? courseProfile.GetOpeningSteps()
|
|
: CourseStepFactory.CloneSteps(openingSteps);
|
|
}
|
|
|
|
public CourseStep[] GetLoopSteps() {
|
|
return courseProfile != null
|
|
? courseProfile.GetLoopSteps()
|
|
: CourseStepFactory.CloneSteps(loopSteps);
|
|
}
|
|
|
|
public string[] GetBackgroundResourcePaths() {
|
|
if(backgroundResourcePaths != null && backgroundResourcePaths.Length > 0)
|
|
{
|
|
return (string[]) backgroundResourcePaths.Clone();
|
|
}
|
|
|
|
return string.IsNullOrEmpty(backgroundResourcePath)
|
|
? new string[0]
|
|
: new string[] { backgroundResourcePath };
|
|
}
|
|
}
|