85 lines
2.4 KiB
C#
85 lines
2.4 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.Menu
|
|
{
|
|
[CreateAssetMenu(fileName = "DefaultChapter", menuName = "Ichni/UI/ChapterSelectionUnit", order = 0)]
|
|
public class ChapterSelectionUnit : SerializedScriptableObject
|
|
{
|
|
public string chapterIndex;
|
|
public string chapterName;
|
|
public string chapterSubtitle;
|
|
public Color themeColor;
|
|
public Sprite avatar;
|
|
|
|
[ListDrawerSettings(ShowFoldout = true)]
|
|
public List<SongItemData> songs = new List<SongItemData>();
|
|
}
|
|
|
|
[InlineProperty]
|
|
[Serializable]
|
|
public class SongItemData
|
|
{
|
|
[HideLabel, FoldoutGroup("$songName", true)]
|
|
public string songName;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public string displaySongName;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public string author;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public bool isNewSong;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public AK.Wwise.Switch songSwitch;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public Sprite albumIconCover;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public Sprite albumIllustrationCover;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public string illustratorName;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public string additionalInformation;
|
|
|
|
[FoldoutGroup("$songName")]
|
|
public List<DifficultyData> difficultyDataList;
|
|
|
|
[Button]
|
|
[FoldoutGroup("$songName")]
|
|
public void AddDefaultDifficulties()
|
|
{
|
|
difficultyDataList.Add(
|
|
new DifficultyData("Easy","", "", new Color(0f, 0.7f, 0.2f, 1f)));
|
|
difficultyDataList.Add(
|
|
new DifficultyData("Hard","", "", new Color(1f, 0.2f, 0.2f, 1f)));
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class DifficultyData
|
|
{
|
|
public string difficultyName;
|
|
public string displayDifficultyName;
|
|
|
|
public string designerName;
|
|
public Color color;
|
|
|
|
public DifficultyData(string difficultyName, string displayDifficultyName, string designerName, Color color)
|
|
{
|
|
this.difficultyName = difficultyName;
|
|
this.displayDifficultyName = displayDifficultyName;
|
|
this.designerName = designerName;
|
|
this.color = color;
|
|
}
|
|
}
|
|
}
|