基础内容11 - SAVE LOAD EXPORT

This commit is contained in:
SoulliesOfficial
2025-02-08 23:09:50 -05:00
parent 7ab738cb68
commit e3a8450a27
61 changed files with 1229 additions and 237 deletions

View File

@@ -39,12 +39,14 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
//(attachedElement as NoteElement).noteJudgeSubmodule = new NoteJudgeSubmodule(attachedElement);
(attachedElement as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attachedElement as NoteBase);
attachedElement.submoduleList.Add((attachedElement as NoteBase).noteJudgeSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
//(attached as NoteElement).noteJudgeSubmodule = new NoteJudgeSubmodule(attached);
(attached as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attached as NoteBase);
attached.submoduleList.Add((attached as NoteBase).noteJudgeSubmodule);
}
}

View File

@@ -7,7 +7,7 @@ using UnityEngine;
namespace Ichni.RhythmGame
{
public abstract partial class NoteBase : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule, IHaveEffectSubmodule
public abstract partial class NoteBase : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule
{
[Title("Basic Info")]
public float exactJudgeTime;
@@ -23,7 +23,6 @@ namespace Ichni.RhythmGame
[Title("Submodules")]
public TransformSubmodule transformSubmodule { get; set; }
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
public EffectSubmodule effectSubmodule { get; set; }
public NoteJudgeSubmodule noteJudgeSubmodule { get; set; }
[Title("In-Game Info")]
@@ -59,12 +58,10 @@ namespace Ichni.RhythmGame
{
transformSubmodule = new TransformSubmodule(this);
timeDurationSubmodule = new TimeDurationSubmodule(this);
effectSubmodule = new EffectSubmodule(this, EffectSubmodule.EffectSubmodulePreset.Note);
noteJudgeSubmodule = new NoteJudgeSubmodule(this);
submoduleList.Add(transformSubmodule);
submoduleList.Add(timeDurationSubmodule);
submoduleList.Add(effectSubmodule);
submoduleList.Add(noteJudgeSubmodule);
}
@@ -93,24 +90,27 @@ namespace Ichni.RhythmGame
isJudged = true;
}
}
effectSubmodule.effectCollection["Generate"].ForEach(e => e.UpdateEffect());
effectSubmodule.effectCollection["GeneralJudge"].ForEach(e => e.UpdateEffect());
switch (EditorManager.instance.currentJudgeType)
if (noteVisual != null)
{
case NoteJudgeType.Perfect:
effectSubmodule.effectCollection["Perfect"].ForEach(e => e.UpdateEffect());
break;
case NoteJudgeType.Good:
effectSubmodule.effectCollection["Good"].ForEach(e => e.UpdateEffect());
break;
case NoteJudgeType.Bad:
effectSubmodule.effectCollection["Bad"].ForEach(e => e.UpdateEffect());
break;
case NoteJudgeType.Miss:
effectSubmodule.effectCollection["Miss"].ForEach(e => e.UpdateEffect());
break;
noteVisual.effectSubmodule.effectCollection["Generate"].ForEach(e => e.UpdateEffect());
noteVisual.effectSubmodule.effectCollection["GeneralJudge"].ForEach(e => e.UpdateEffect());
switch (EditorManager.instance.currentJudgeType)
{
case NoteJudgeType.Perfect:
noteVisual.effectSubmodule.effectCollection["Perfect"].ForEach(e => e.UpdateEffect());
break;
case NoteJudgeType.Good:
noteVisual.effectSubmodule.effectCollection["Good"].ForEach(e => e.UpdateEffect());
break;
case NoteJudgeType.Bad:
noteVisual.effectSubmodule.effectCollection["Bad"].ForEach(e => e.UpdateEffect());
break;
case NoteJudgeType.Miss:
noteVisual.effectSubmodule.effectCollection["Miss"].ForEach(e => e.UpdateEffect());
break;
}
}
}

View File

@@ -4,7 +4,7 @@ using UnityEngine;
namespace Ichni.RhythmGame
{
public abstract class NoteVisualBase : SubstantialObject
public abstract class NoteVisualBase : SubstantialObject, IHaveEffectSubmodule
{
public NoteBase note;
@@ -13,5 +13,14 @@ namespace Ichni.RhythmGame
public List<GameObject> notePartList;
public List<GameObject> effectPartList;
public EffectSubmodule effectSubmodule { get; set; }
protected override void SetDefaultSubmodules()
{
base.SetDefaultSubmodules();
effectSubmodule = new EffectSubmodule(this, EffectSubmodule.EffectSubmodulePreset.Note);
submoduleList.Add(effectSubmodule);
}
}
}