高亮测试

This commit is contained in:
SoulliesOfficial
2025-05-20 04:28:10 -04:00
parent fa34a702b8
commit 1d176a606b
52 changed files with 2434 additions and 27 deletions

View File

@@ -10,11 +10,14 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public partial class DTMNoteVisual : NoteVisualBase
{
public List<Material> normalMaterialList;
public List<Material> highlightMaterialList;
public new static DTMNoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement)
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement, bool isHighlighted)
{
DTMNoteVisual noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<DTMNoteVisual>();
DTMNoteVisual noteVisual = NoteVisualBase.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement, isHighlighted).GetComponent<DTMNoteVisual>();
return noteVisual;
}
@@ -67,13 +70,35 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void SaveBM()
{
matchedBM = new Beatmap.DTMNoteVisual_BM(elementName, elementGuid, tags,
parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
parentElement.matchedBM as GameElement_BM, themeBundleName, objectName, isHighlighted);
}
public override void SetHighlight()
{
List<Renderer> partRendererList = notePartList.Select(part => part.GetComponent<Renderer>()).ToList();
//partRendererList.ForEach(rend => Destroy(rend.material));
if (!isHighlighted)
{
for (int i = 0; i < partRendererList.Count; i++)
{
partRendererList[i].material = Instantiate(normalMaterialList[i]);
}
}
else
{
for (int i = 0; i < partRendererList.Count; i++)
{
partRendererList[i].material = Instantiate(highlightMaterialList[i]);
}
}
}
}
namespace Beatmap
{
public class DTMNoteVisual_BM : SubstantialObject_BM
public class DTMNoteVisual_BM : NoteVisualBase_BM
{
public DTMNoteVisual_BM()
{
@@ -81,8 +106,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
}
public DTMNoteVisual_BM(string elementName, Guid id, List<string> tags,
GameElement_BM parent, string themeBundleName, string objectName) :
base(elementName, id, tags, parent, themeBundleName, objectName)
GameElement_BM parent, string themeBundleName, string objectName, bool isHighlighted) :
base(elementName, id, tags, parent, themeBundleName, objectName, isHighlighted)
{
}
@@ -90,13 +115,13 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void ExecuteBM()
{
matchedElement = DTMNoteVisual.GenerateElement(elementName, elementGuid, tags, false,
themeBundleName, objectName, GetElement(attachedElementGuid));
themeBundleName, objectName, GetElement(attachedElementGuid), isHighlighted);
}
public override GameElement DuplicateBM(GameElement parent)
{
return DTMNoteVisual.GenerateElement(elementName, Guid.NewGuid(), tags, false, themeBundleName,
objectName, parent);
objectName, parent, isHighlighted);
}
}
}