高亮测试
This commit is contained in:
@@ -9,6 +9,8 @@ namespace Ichni.RhythmGame
|
||||
public abstract class NoteVisualBase : SubstantialObject, IHaveEffectSubmodule, IHaveSelectSubmodule
|
||||
{
|
||||
public NoteBase note;
|
||||
|
||||
public bool isHighlighted;
|
||||
|
||||
public GameObject noteMain;
|
||||
public GameObject judgeEffect;
|
||||
@@ -19,6 +21,18 @@ namespace Ichni.RhythmGame
|
||||
public EffectSubmodule effectSubmodule { get; set; }
|
||||
public SelectSubmodule selectSubmodule { get; set; }
|
||||
|
||||
public new 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();
|
||||
|
||||
return noteVisual;
|
||||
}
|
||||
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
base.SetDefaultSubmodules();
|
||||
@@ -48,11 +62,52 @@ 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 =
|
||||
inspector.GenerateToggle(this, settingsSubcontainer, "Highlight", nameof(isHighlighted))
|
||||
.AddListenerFunction(SetHighlight);
|
||||
}
|
||||
|
||||
public virtual void Recover()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void SetHighlight()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public abstract class NoteVisualBase_BM : SubstantialObject_BM
|
||||
{
|
||||
public bool isHighlighted;
|
||||
public NoteVisualBase_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public NoteVisualBase_BM(string elementName, Guid id, List<string> tags,
|
||||
GameElement_BM parent, string themeBundleName, string objectName, bool isHighlighted) :
|
||||
base(elementName, id, tags, parent, themeBundleName, objectName)
|
||||
{
|
||||
this.isHighlighted = isHighlighted;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user