This commit is contained in:
SoulliesOfficial
2025-07-20 13:39:29 -04:00
parent eeecba5a3e
commit bbb8057b08
54 changed files with 146600 additions and 123039 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using Lean.Pool;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
@@ -15,19 +16,20 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.effectParticle = noteVisual.effectPartList[2].GetComponent<ParticleSystem>();
this.effectParticle = noteVisual.effectPrefabList[2].GetComponent<ParticleSystem>();
this.effectTime = 0f;
}
public override void Recover()
{
effectParticle.Stop();
noteVisual.noteMain.SetActive(true);
// noteVisual.noteMain.SetActive(true);
}
public override void Adjust()
{
effectParticle = LeanPool.Spawn(noteVisual.effectPrefabList[0], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
effectParticle.Play();
noteVisual.noteMain.SetActive(false);
LeanPool.Despawn(effectParticle.gameObject, 1);
}
public override EffectBase_BM ConvertToBM()

View File

@@ -1,10 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Dreamteck.Splines;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.Basic;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
@@ -22,7 +17,14 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public sealed override void Recover()
{
noteVisual.noteMain.SetActive(false);
noteVisual.noteMain.transform.localScale = Vector3.zero;
if (noteVisual is DTMNoteVisualHold noteVisualHold)
{
noteVisualHold.meshGenerator.size = 0;
}
else
{
noteVisual.noteMain.transform.localScale = Vector3.zero;
}
}
public override void PreExecute()
@@ -33,12 +35,26 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void Execute()
{
float e = AnimationCurveEvaluator.Evaluate(AnimationCurveType.OutQuad, effectProgressPercent);
noteVisual.noteMain.transform.localScale = e * Vector3.one;
if (noteVisual is DTMNoteVisualHold noteVisualHold)
{
noteVisualHold.meshGenerator.size = e;
}
else
{
noteVisual.noteMain.transform.localScale = e * Vector3.one;
}
}
public override void Adjust()
{
noteVisual.noteMain.transform.localScale = Vector3.one;
if (noteVisual is DTMNoteVisualHold noteVisualHold)
{
noteVisualHold.meshGenerator.size = 1;
}
else
{
noteVisual.noteMain.transform.localScale = Vector3.one;
}
}
public override EffectBase_BM ConvertToBM()

View File

@@ -0,0 +1,101 @@
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 DTMNoteGenerateExtend : NoteGenerateEffect
{
private Hold hold;
private DTMNoteVisualHold noteVisualHold;
public float targetStartPercent, targetEndPercent;
public float startPercent, endPercent;
public DTMNoteGenerateExtend(NoteVisualBase noteVisual, float generateTime, float effectTime)
{
this.note = noteVisual.note;
this.hold = note as Hold;
this.noteVisual = noteVisual;
this.noteVisualHold = noteVisual as DTMNoteVisualHold;
this.generateTime = generateTime;
this.effectTime = effectTime;
}
private void UpdateHold()
{
hold.trackPositioner.SetPercent(startPercent);
noteVisualHold.meshGenerator.SetClipRange(startPercent, endPercent);
noteVisualHold.headPoint.SetPercent(startPercent);
noteVisualHold.tailPoint.SetPercent(endPercent);
}
public override void Recover()
{
noteVisualHold.noteMain.SetActive(false);
}
public override EffectBase_BM ConvertToBM()
{
return new DTMNoteGenerateExtend_BM(effectTime, generateTime);
}
public override void PreExecute()
{
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
targetStartPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime);
targetEndPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
startPercent = targetStartPercent;
endPercent = targetStartPercent;
noteVisual.noteMain.SetActive(true);
}
public override void Execute()
{
float e = AnimationCurveEvaluator.Evaluate(AnimationCurveType.OutQuad, effectProgressPercent);
startPercent = targetStartPercent;
endPercent = Mathf.Lerp(targetStartPercent, targetEndPercent, e);
UpdateHold();
}
public override void Adjust()
{
startPercent = targetStartPercent;
endPercent = targetEndPercent;
UpdateHold();
}
public override void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("DTM Note Generate Expand");
var subcontainer = container.GenerateSubcontainer(3);
var generateTimeField = inspector.GenerateInputField(this, subcontainer, "Generate Time", nameof(generateTime));
var effectTimeField = inspector.GenerateInputField(this, subcontainer, "Effect Time", nameof(effectTime));
}
}
namespace Beatmap
{
public class DTMNoteGenerateExtend_BM : NoteGenerateEffect_BM
{
public DTMNoteGenerateExtend_BM()
{
}
public DTMNoteGenerateExtend_BM(float effectTime, float generateTime) :
base(effectTime, generateTime)
{
}
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
return new DTMNoteGenerateExtend(attachedGameElement as NoteVisualBase, generateTime, effectTime);
}
}
}
}

View File

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

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using Lean.Pool;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
@@ -15,19 +16,19 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.effectParticle = noteVisual.effectPartList[1].GetComponent<ParticleSystem>();
this.effectTime = 0f;
}
public override void Recover()
{
effectParticle.Stop();
noteVisual.noteMain.SetActive(true);
//noteVisual.noteMain.SetActive(true);
}
public override void Adjust()
{
effectParticle = LeanPool.Spawn(noteVisual.effectPrefabList[0], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
effectParticle.Play();
noteVisual.noteMain.SetActive(false);
LeanPool.Despawn(effectParticle.gameObject, 1);
}
public override EffectBase_BM ConvertToBM()

View File

@@ -0,0 +1,70 @@
using System.Collections;
using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Lean.Pool;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMNoteHoldingBreath : NoteHoldingEffect
{
private ParticleSystem breathParticle;
public DTMNoteHoldingBreath(DTMNoteVisualHold noteVisual)
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.effectTime = GetHoldingTime();
}
public override void Recover()
{
if(breathParticle != null) LeanPool.Despawn(breathParticle.gameObject);
}
public override void PreExecute()
{
breathParticle = LeanPool.Spawn(noteVisual.effectPrefabList[3], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
breathParticle.Play();
}
public override void Adjust()
{
breathParticle.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear);
}
public override EffectBase_BM ConvertToBM()
{
return new Beatmap.DTMNoteHoldingBreath_BM(effectTime);
}
public override void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Basic Note Holding Expand");
var subcontainer = container.GenerateSubcontainer(3);
}
}
namespace Beatmap
{
public class DTMNoteHoldingBreath_BM : NoteHoldingEffect_BM
{
public DTMNoteHoldingBreath_BM()
{
}
public DTMNoteHoldingBreath_BM(float effectTime) : base(effectTime)
{
}
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
return new DTMNoteHoldingBreath(attachedGameElement as DTMNoteVisualHold);
}
}
}
}

View File

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

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using Lean.Pool;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
@@ -15,19 +16,19 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
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);
//noteVisual.noteMain.SetActive(true);
}
public override void Adjust()
{
effectParticle = LeanPool.Spawn(noteVisual.effectPrefabList[0], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
effectParticle.Play();
noteVisual.noteMain.SetActive(false);
LeanPool.Despawn(effectParticle.gameObject, 1);
}
public override EffectBase_BM ConvertToBM()

View File

@@ -51,17 +51,19 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public override void Recover()
{
effectPartList.ForEach(effectPart =>
foreach (GameObject part in notePartList)
{
effectPart.GetComponent<ParticleSystem>().Stop();
});
foreach (Renderer renderer in notePartList.Select(part => part.GetComponent<Renderer>()))
{
renderer.material.SetFloat("_MainAlpha", 1f);
Renderer rend = part.GetComponent<Renderer>();
if (rend != null)
{
rend.material.SetFloat("_MainAlpha", 1f);
}
}
noteMain.transform.localScale = Vector3.zero;
foreach (EffectBase effect in effectSubmodule.effectCollection["Generate"])
{
effect.Recover();
}
}
}

View File

@@ -0,0 +1,162 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Dreamteck.Splines;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public partial class DTMNoteVisualHold : DTMNoteVisual, INoteVisualHold
{
public Hold hold { get; set; }
public MeshGenerator meshGenerator;
public SplinePositioner headPoint, tailPoint;
public static DTMNoteVisualHold GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
{
DTMNoteVisualHold noteVisualHold = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<DTMNoteVisualHold>();
return noteVisualHold;
}
public override void FirstSetUpObject(bool isFirstGenerated)
{
NoteBase note = parentElement as NoteBase;
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
if(!note.isOnTrack) throw new System.Exception("这种HoldNoteVisual只能生成在Track上。");
this.note = note;
note.noteVisual = this;
this.hold = note as Hold;
this.headPoint = notePartList[0].GetComponent<SplinePositioner>();
this.meshGenerator = notePartList[1].GetComponent<MeshGenerator>();
this.tailPoint = notePartList[2].GetComponent<SplinePositioner>();
this.hold.trackPositioner.autoUpdate = false;
headPoint.spline = hold.track.trackPathSubmodule.path;
meshGenerator.spline = hold.track.trackPathSubmodule.path;
tailPoint.spline = hold.track.trackPathSubmodule.path;
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
float startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime);
float endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
hold.trackPositioner.SetPercent(startPercent);
meshGenerator.SetClipRange(startPercent, endPercent);
headPoint.SetPercent(startPercent);
tailPoint.SetPercent(endPercent);
if (isFirstGenerated)
{
note.noteJudgeSubmodule.AddJudgeUnit("TouchArea");
effectSubmodule.effectCollection["Generate"].Add(new DTMNoteGenerateExtend(this, 1f, 0.5f));
effectSubmodule.effectCollection["Perfect"].Add(new DTMNotePerfectBurst(this));
effectSubmodule.effectCollection["Good"].Add(new DTMNoteGoodBurst(this));
effectSubmodule.effectCollection["Bad"].Add(new DTMNoteBadBurst(this));
effectSubmodule.effectCollection["Miss"].Add(new DTMNoteMissTransparent(this, 0.2f));
}
}
public override void AfterInitialize()
{
base.AfterInitialize();
Recover();
}
public override void Recover()
{
foreach (GameObject part in notePartList)
{
Renderer rend = part.GetComponent<Renderer>();
if (rend != null)
{
rend.material.SetFloat("_MainAlpha", 1f);
}
}
foreach (EffectBase effect in effectSubmodule.effectCollection["Generate"])
{
effect.Recover();
}
}
}
public partial class DTMNoteVisualHold
{
public override void SaveBM()
{
matchedBM = new DTMNoteVisualHold_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
}
private float startPercent, endPercent;
public void UpdateHoldInMovableTrack()
{
if (effectSubmodule.effectCollection["Generate"].Any(e => e.nowEffectState == EffectBase.EffectState.Middle))
{
return;
}
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime);
endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
if (hold.isHolding)
{
startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime + hold.holdingTime);
endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
}
else if (hold.isFinalJudged)
{
startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
}
hold.trackPositioner.SetPercent(startPercent);
meshGenerator.SetClipRange(startPercent, endPercent);
headPoint.SetPercent(startPercent);
tailPoint.SetPercent(endPercent);
}
public void UpdateHoldInStaticTrack()
{
//throw new NotImplementedException();
}
}
namespace Beatmap
{
public class DTMNoteVisualHold_BM : SubstantialObject_BM
{
public DTMNoteVisualHold_BM()
{
}
public DTMNoteVisualHold_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 = DTMNoteVisualHold.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName);
}
public override GameElement DuplicateBM(GameElement parent)
{
return DTMNoteVisualHold.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
}
}
}
}

View File

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