perf
This commit is contained in:
@@ -27,20 +27,6 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
if (note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
|
||||
this.note = note;
|
||||
note.noteVisual = this;
|
||||
|
||||
if (isFirstGenerated)
|
||||
{
|
||||
throw new NotImplementedException("游戏本体不会出现isFirstGenerated为true的情况。");
|
||||
/*note.noteJudgeSubmodule.AddJudgeUnit("TouchArea");
|
||||
effectSubmodule.effectCollection["Generate"].Add(new DTMNoteGenerateExpand(this, 1f, 0.2f));
|
||||
effectSubmodule.effectCollection["Perfect"].Add(new DTMNotePerfectBurst(this));
|
||||
if (objectName.Contains("Tap"))
|
||||
{
|
||||
effectSubmodule.effectCollection["Good"].Add(new DTMNoteGoodBurst(this));
|
||||
effectSubmodule.effectCollection["Bad"].Add(new DTMNoteBadBurst(this));
|
||||
}
|
||||
effectSubmodule.effectCollection["Miss"].Add(new DTMNoteMissTransparent(this, 0.2f));*/
|
||||
}
|
||||
}
|
||||
|
||||
public override void AfterInitialize()
|
||||
@@ -51,17 +37,19 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
effectPartList.ForEach(effectPart =>
|
||||
foreach (GameObject part in notePartList)
|
||||
{
|
||||
effectPart.GetComponent<ParticleSystem>().Stop();
|
||||
});
|
||||
|
||||
foreach (Renderer renderer in notePartList.Select(part => part.GetComponent<Renderer>()))
|
||||
{
|
||||
renderer.material.SetFloat("_MainAlpha", 1f);
|
||||
Renderer rend = part.GetComponent<Renderer>();
|
||||
if (rend != null)
|
||||
{
|
||||
rend.material.SetFloat("_MainAlpha", 1f);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (EffectBase effect in effectSubmodule.effectCollection["Generate"])
|
||||
{
|
||||
effect.Recover();
|
||||
}
|
||||
|
||||
noteMain.transform.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,14 +71,14 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
{
|
||||
for (int i = 0; i < partRendererList.Count; i++)
|
||||
{
|
||||
partRendererList[i].material = Instantiate(normalMaterialList[i]);
|
||||
partRendererList[i].material = normalMaterialList[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < partRendererList.Count; i++)
|
||||
{
|
||||
partRendererList[i].material = Instantiate(highlightMaterialList[i]);
|
||||
partRendererList[i].material = highlightMaterialList[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user