Substantial Object生成调整

可以正确的生成NoteVisual
This commit is contained in:
SoulliesOfficial
2025-02-22 01:56:33 -05:00
parent f941ca7dbc
commit 935cbbb029
37 changed files with 11095 additions and 154 deletions

View File

@@ -35,7 +35,7 @@ ModelImporter:
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 5
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
@@ -90,7 +90,7 @@ ModelImporter:
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 0.049999997
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0

View File

@@ -0,0 +1,65 @@
using System.Collections;
using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMNotePerfectBurst : NotePerfectEffect
{
private ParticleSystem effectParticle;
public DTMNotePerfectBurst(NoteVisualBase noteVisual)
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.effectParticle = noteVisual.effectPartList[0].GetComponent<ParticleSystem>();
this.effectTime = 0f;
}
public override void Recover()
{
effectParticle.Stop();
noteVisual.noteMain.SetActive(true);
}
public override void Adjust()
{
effectParticle.Play();
noteVisual.noteMain.SetActive(false);
}
public override EffectBase_BM ConvertToBM()
{
return new DTMNotePerfectBurst_BM(effectTime);
}
public override void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Basic Note Perfect Burst");
}
}
namespace Beatmap
{
public class DTMNotePerfectBurst_BM : NotePerfectEffect_BM
{
public DTMNotePerfectBurst_BM()
{
}
public DTMNotePerfectBurst_BM(float effectTime) : base(effectTime)
{
}
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
return new DTMNotePerfectBurst(attachedGameElement as NoteVisualBase);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4979bd6148dc44f2c9444c1d3f663a2a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -9,31 +9,36 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public partial class DTMNoteVisual : NoteVisualBase
{
public static DTMNoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement)
{
DTMNoteVisual noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<DTMNoteVisual>();
return noteVisual;
}
public override void FirstSetUpObject(bool isFirstGenerated)
{
NoteBase note = parentElement as NoteBase;
if (note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
noteVisual.note = note;
note.noteVisual = noteVisual;
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
this.note = note;
note.noteVisual = this;
if (isFirstGenerated)
{
//noteVisual.effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(noteVisual.note));
//noteVisual.effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(noteVisual.note));
//noteVisual.effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(noteVisual.note));
//noteVisual.effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadExpand(noteVisual.note));
//noteVisual.effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(noteVisual.note));
//effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
effectSubmodule.effectCollection["Perfect"].Add(new DTMNotePerfectBurst(this));
//effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
//effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadExpand(this));
//effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));
}
return noteVisual;
}
}
public partial class DTMNoteVisual
{
public override void SaveBM()
{
matchedBM = new Beatmap.DTMNoteVisual_BM(elementName, elementGuid, tags,
@@ -60,13 +65,13 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void ExecuteBM()
{
matchedElement = DTMNoteVisual.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName);
themeBundleName, objectName, GetElement(attachedElementGuid));
}
public override GameElement DuplicateBM(GameElement parent)
{
return DTMNoteVisual.GenerateElement(elementName, elementGuid, tags, false, parent, themeBundleName,
objectName);
return DTMNoteVisual.GenerateElement(elementName, elementGuid, tags, false, themeBundleName,
objectName, parent);
}
}
}