add difficultyDataClass
This commit is contained in:
parent
4f4607685d
commit
8be964e884
|
|
@ -67,6 +67,7 @@ public static class Const {
|
|||
public static readonly string ShopCustomizeBonusDataSheet = "ShopCustomizeBonusData";
|
||||
public static readonly string ScrollGamePlaceDataSheet = "ScrollGamePlaceData";
|
||||
public static readonly string ScrollGameStageDataSheet = "ScrollGameStageData";
|
||||
public static readonly string ScrollGameStageDifficultyDataSheet = "ScrollGameStageDifficultyData";
|
||||
|
||||
// language
|
||||
public static readonly string LangJapanDataSheet = "LangJapanData";
|
||||
|
|
@ -106,6 +107,7 @@ public static class Const {
|
|||
new SheetData(Const.ShopCustomizeBonusDataSheet),
|
||||
new SheetData(Const.ScrollGamePlaceDataSheet),
|
||||
new SheetData(Const.ScrollGameStageDataSheet),
|
||||
new SheetData(Const.ScrollGameStageDifficultyDataSheet),
|
||||
};
|
||||
public static readonly SheetData[] LanguageSheetNameList = new SheetData[]{
|
||||
new SheetData(Const.LangJapanDataSheet, "LanguageData"),
|
||||
|
|
|
|||
|
|
@ -573,4 +573,31 @@ public sealed class ScrollGameStageData
|
|||
{
|
||||
return RandomPrefabName.Select(x => Resources.Load<Transform>($"ScrollGame/Stages/Stage{x}")).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class ScrollGameStageDifficultyData
|
||||
{
|
||||
public int id;
|
||||
public int placeId;
|
||||
public int normalTime;
|
||||
public int hardTime;
|
||||
public int extraTime;
|
||||
|
||||
public ScrollGameDifficulty GetDifficultySwitchTime(float time)
|
||||
{
|
||||
if (time >= extraTime)
|
||||
{
|
||||
return ScrollGameDifficulty.Extra;
|
||||
}
|
||||
if (time >= hardTime)
|
||||
{
|
||||
return ScrollGameDifficulty.Hard;
|
||||
}
|
||||
if (time >= normalTime)
|
||||
{
|
||||
return ScrollGameDifficulty.Normal;
|
||||
}
|
||||
return ScrollGameDifficulty.Easy;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue