60 lines
1.8 KiB
C#
60 lines
1.8 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.RhythmGame.Beatmap;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame
|
|
{
|
|
public partial class NoteJudgeSubmodule : SubmoduleBase
|
|
{
|
|
#region [暴露属性字段] Judge Units
|
|
public List<NoteJudgeUnit> judgeUnitList;
|
|
private NoteBase note => attachedGameElement as NoteBase;
|
|
#endregion
|
|
|
|
#region [生命周期] Initialization
|
|
public NoteJudgeSubmodule(NoteBase attachedGameElement) : base(attachedGameElement)
|
|
{
|
|
judgeUnitList = new List<NoteJudgeUnit>();
|
|
|
|
if (!HaveSameSubmodule)
|
|
{
|
|
this.note.NoteJudgeSubmodule = this;
|
|
}
|
|
}
|
|
|
|
public NoteJudgeSubmodule(NoteBase attachedGameElement, List<NoteJudgeUnit_BM> judgeUnitList_BM) : base(attachedGameElement)
|
|
{
|
|
judgeUnitList = new List<NoteJudgeUnit>();
|
|
|
|
foreach (NoteJudgeUnit_BM judgeUnitBM in judgeUnitList_BM)
|
|
{
|
|
judgeUnitList.Add(judgeUnitBM.ConvertToGameType(attachedGameElement));
|
|
}
|
|
|
|
if (!HaveSameSubmodule)
|
|
{
|
|
this.note.NoteJudgeSubmodule = this;
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
|
|
#region [扩展工厂] Collection Factory
|
|
public partial class NoteJudgeSubmodule
|
|
{
|
|
private static Dictionary<string, NoteJudgeUnit> JudgeUnitCollection(NoteBase note) =>
|
|
new Dictionary<string, NoteJudgeUnit>()
|
|
{
|
|
{ "TouchArea", new TouchAreaJudgeUnit(note, 1000) },
|
|
{ "FullScreenNearTime", new FullScreenNearTimeJudgeUnit(note) },
|
|
{ "TriggerConnect", new TriggerConnectJudgeUnit(note, null) }
|
|
};
|
|
}
|
|
#endregion
|
|
|
|
#region [Beatmap] Executing and Reversing
|
|
|
|
#endregion
|
|
|
|
} |