This commit is contained in:
2025-06-09 13:49:17 +08:00
parent 1837d5ead0
commit f151620885
9 changed files with 12863 additions and 40 deletions

View File

@@ -64,7 +64,17 @@ namespace Ichni.RhythmGame
timeDurationSubmodule = new TimeDurationSubmodule(this);
noteJudgeSubmodule = new NoteJudgeSubmodule(this);
}
public override void Refresh()
{
base.Refresh();
if (noteVisual != null)
{
noteVisual.Refresh();
}
}
protected virtual void Update()
{
if (isOnTrack)

View File

@@ -11,28 +11,28 @@ namespace Ichni.RhythmGame
public NoteBase note;
public bool isHighlighted;
public GameObject noteMain;
public GameObject judgeEffect;
public List<GameObject> notePartList;
public List<GameObject> effectPartList;
public EffectSubmodule effectSubmodule { get; set; }
public SelectSubmodule selectSubmodule { get; set; }
public new static NoteVisualBase GenerateElement(string elementName, Guid id, List<string> tags,
public static NoteVisualBase GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement, bool isHighlighted)
{
NoteVisualBase noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<NoteVisualBase>();
noteVisual.isHighlighted = isHighlighted;
noteVisual.SetHighlight();
noteVisual.SetEditorSubmodules();
return noteVisual;
}
public override void SetDefaultSubmodules()
{
base.SetDefaultSubmodules();
@@ -41,13 +41,13 @@ namespace Ichni.RhythmGame
public override void SetEditorSubmodules()
{
selectSubmodule = new SelectSubmodule(this, note);
selectSubmodule ??= new SelectSubmodule(this, note);
}
public override void SetUpInspector()
{
base.SetUpInspector();
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Generate");
var generateAnimation = container.GenerateSubcontainer(3);
@@ -62,22 +62,21 @@ namespace Ichni.RhythmGame
Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
var settings = inspector.GenerateContainer("Settings");
var settingsSubcontainer = container.GenerateSubcontainer(3);
var highlightToggle =
var highlightToggle =
inspector.GenerateToggle(this, settingsSubcontainer, "Highlight", nameof(isHighlighted))
.AddListenerFunction(SetHighlight);
}
public virtual void Recover()
{
}
public virtual void SetHighlight()
{
}
}
@@ -97,7 +96,7 @@ namespace Ichni.RhythmGame
{
this.isHighlighted = isHighlighted;
}
public override void ExecuteBM()
{
throw new NotImplementedException();
@@ -109,5 +108,5 @@ namespace Ichni.RhythmGame
}
}
}
}