Hold初步

This commit is contained in:
SoulliesOfficial
2025-03-16 01:35:05 -04:00
parent a48e7d59ac
commit 4aad7b3882
51 changed files with 162919 additions and 82 deletions

View File

@@ -1,18 +1,75 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
public class BasicHoldVisual : MonoBehaviour
namespace Ichni.RhythmGame.ThemeBundles.Basic
{
// Start is called before the first frame update
void Start()
public partial class BasicHoldVisual : NoteVisualBaseHold
{
public static BasicHoldVisual GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
{
BasicHoldVisual holdVisual = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicHoldVisual>();
return holdVisual;
}
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["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));
}
}
}
public partial class BasicHoldVisual
{
public override void SaveBM()
{
matchedBM = new Beatmap.BasicHoldVisual_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
}
}
// Update is called once per frame
void Update()
namespace Beatmap
{
public class BasicHoldVisual_BM : SubstantialObject_BM
{
public BasicHoldVisual_BM()
{
}
public BasicHoldVisual_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 = BasicHoldVisual.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName);
}
public override GameElement DuplicateBM(GameElement parent)
{
return BasicHoldVisual.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
}
}
}
}
}