Files
2025-04-26 21:11:30 -04:00

81 lines
3.0 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.Basic;
using Ichni.RhythmGame.ThemeBundles.MetropolisOnOrbit.Beatmap;
using UnityEngine;
using UnityEngine.Serialization;
namespace Ichni.RhythmGame.ThemeBundles.MetropolisOnOrbit
{
public partial class MOONoteVisual : NoteVisualBase
{
public Animator judgeEffectAnimator;
public static MOONoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
{
MOONoteVisual noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<MOONoteVisual>();
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["Perfect"].Add(new MOONotePerfectAnimation(this));
/*effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadShrink(this));
effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));*/
}
}
}
public partial class MOONoteVisual
{
public override void SaveBM()
{
matchedBM = new MOONoteVisual_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
}
}
namespace Beatmap
{
public class MOONoteVisual_BM : SubstantialObject_BM
{
public MOONoteVisual_BM()
{
}
public MOONoteVisual_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 = MOONoteVisual.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName);
}
public override GameElement DuplicateBM(GameElement parent)
{
return MOONoteVisual.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
}
}
}
}