Files
ichni_Creator_Studio/Assets/ThemeBundles/Basic/Scripts/NoteVisual/BasicNoteVisual.cs

75 lines
2.9 KiB
C#
Raw Normal View History

2025-02-02 08:34:54 -05:00
using System;
using System.Collections;
using System.Collections.Generic;
2025-02-02 21:59:43 -05:00
using Ichni.RhythmGame.Beatmap;
using Lean.Pool;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.Basic
{
2025-02-02 21:59:43 -05:00
public partial class BasicNoteVisual : NoteVisualBase
{
public static BasicNoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
{
BasicNoteVisual noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicNoteVisual>();
return noteVisual;
}
public override void FirstSetUpObject(bool isFirstGenerated)
{
NoteBase note = parentElement as NoteBase;
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
this.note = note;
note.noteVisual = this;
if (isFirstGenerated)
{
effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(this));
effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadExpand(this));
effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));
}
}
}
2025-02-02 21:59:43 -05:00
public partial class BasicNoteVisual
{
public override void SaveBM()
{
matchedBM = new Beatmap.BasicNoteVisual_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
2025-02-02 21:59:43 -05:00
}
}
namespace Beatmap
{
public class BasicNoteVisual_BM : SubstantialObject_BM
2025-02-02 21:59:43 -05:00
{
public BasicNoteVisual_BM()
{
}
public BasicNoteVisual_BM(string elementName, Guid id, List<string> tags,
GameElement_BM parent, string themeBundleName, string objectName) :
base(elementName, id, tags, parent, themeBundleName, objectName)
2025-02-02 21:59:43 -05:00
{
2025-02-02 21:59:43 -05:00
}
public override void ExecuteBM()
{
matchedElement = BasicNoteVisual.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName);
2025-02-02 21:59:43 -05:00
}
public override GameElement DuplicateBM(GameElement parent)
2025-02-02 21:59:43 -05:00
{
return BasicNoteVisual.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
2025-02-02 21:59:43 -05:00
}
}
}
}