Files
ichni_Official/Assets/ThemeBundles/Basic/Scripts/NoteVisual/BasicHoldVisualStatic.cs

63 lines
2.5 KiB
C#
Raw Normal View History

2025-07-10 08:42:30 -04:00
using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.Basic
{
public partial class BasicHoldVisualStatic : NoteVisualBaseHold
{
public static BasicHoldVisualStatic GenerateElement(string elementName, Guid id, List<string> tags,
2026-03-14 03:13:10 -04:00
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
2025-07-10 08:42:30 -04:00
{
2026-03-14 03:13:10 -04:00
BasicHoldVisualStatic holdVisualStatic = SubstantialObject.GenerateElement(elementName, id, tags,
2025-07-10 08:42:30 -04:00
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicHoldVisualStatic>();
2026-03-14 03:13:10 -04:00
2025-07-10 08:42:30 -04:00
return holdVisualStatic;
}
2026-03-14 03:13:10 -04:00
2025-07-10 08:42:30 -04:00
public override void FirstSetUpObject(bool isFirstGenerated)
{
NoteBase note = parentElement as NoteBase;
2026-03-14 03:13:10 -04:00
if (note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
2025-07-10 08:42:30 -04:00
this.note = note;
note.noteVisual = this;
this.hold = note as Hold;
if (isFirstGenerated)
{
effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
effectSubmodule.effectCollection["Holding"].Add(new BasicNoteHoldingExpand(this));
effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(this));
effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadShrink(this));
effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));
}
}
}
namespace Beatmap
{
public class BasicHoldVisualStatic_BM : SubstantialObject_BM
{
public BasicHoldVisualStatic_BM()
{
}
public BasicHoldVisualStatic_BM(string elementName, Guid id, List<string> tags,
GameElement_BM parent, string themeBundleName, string objectName) :
base(elementName, id, tags, parent, themeBundleName, objectName)
{
}
public override void ExecuteBM()
{
matchedElement = BasicHoldVisualStatic.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName);
}
}
}
}