函数: findSongDifficulty()
调用签名
ts
function findSongDifficulty<TStandard, TDx, TUtage>(
song,
type,
levelIndex): TStandard | undefined;定义于: song-maps.ts:77
按谱面类型与难度索引查找曲目难度,保留各类型的具体难度结构。
类型参数
| 类型参数 |
|---|
TStandard extends DifficultyMeta |
TDx extends DifficultyMeta |
TUtage extends DifficultyMeta |
参数
| 参数 | 类型 | 描述 |
|---|---|---|
song | DifficultyLists<TStandard, TDx, TUtage> | 含 difficulties.standard / dx / 可选 utage 的曲目 |
type | "standard" | 谱面类型 |
levelIndex | number | 难度下标 |
返回
TStandard | undefined
匹配的难度项;未找到为 undefined
示例
ts
const master = findSongDifficulty(song, "dx", LevelIndex.MASTER);
console.log(master?.level_value);调用签名
ts
function findSongDifficulty<TStandard, TDx, TUtage>(
song,
type,
levelIndex): TDx | undefined;定义于: song-maps.ts:86
按谱面类型与难度索引查找曲目难度,保留各类型的具体难度结构。
类型参数
| 类型参数 |
|---|
TStandard extends DifficultyMeta |
TDx extends DifficultyMeta |
TUtage extends DifficultyMeta |
参数
| 参数 | 类型 | 描述 |
|---|---|---|
song | DifficultyLists<TStandard, TDx, TUtage> | 含 difficulties.standard / dx / 可选 utage 的曲目 |
type | "dx" | 谱面类型 |
levelIndex | number | 难度下标 |
返回
TDx | undefined
匹配的难度项;未找到为 undefined
示例
ts
const master = findSongDifficulty(song, "dx", LevelIndex.MASTER);
console.log(master?.level_value);调用签名
ts
function findSongDifficulty<TStandard, TDx, TUtage>(
song,
type,
levelIndex): TUtage | undefined;定义于: song-maps.ts:95
按谱面类型与难度索引查找曲目难度,保留各类型的具体难度结构。
类型参数
| 类型参数 |
|---|
TStandard extends DifficultyMeta |
TDx extends DifficultyMeta |
TUtage extends DifficultyMeta |
参数
| 参数 | 类型 | 描述 |
|---|---|---|
song | DifficultyLists<TStandard, TDx, TUtage> | 含 difficulties.standard / dx / 可选 utage 的曲目 |
type | "utage" | 谱面类型 |
levelIndex | number | 难度下标 |
返回
TUtage | undefined
匹配的难度项;未找到为 undefined
示例
ts
const master = findSongDifficulty(song, "dx", LevelIndex.MASTER);
console.log(master?.level_value);