内容修补

This commit is contained in:
SoulliesOfficial
2025-04-20 14:30:28 -04:00
parent 957b1e3702
commit 2ddf04a51b
19 changed files with 509 additions and 234 deletions

View File

@@ -0,0 +1,83 @@
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
{
public class DTMNoteGenerateExpand : NoteGenerateEffect
{
public DTMNoteGenerateExpand(NoteVisualBase noteVisual, float generateTime, float effectTime)
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.generateTime = generateTime;
this.effectTime = effectTime;
}
public sealed override void Recover()
{
noteVisual.noteMain.SetActive(false);
noteVisual.noteMain.transform.localScale = Vector3.zero;
}
public override void PreExecute()
{
noteVisual.noteMain.SetActive(true);
}
public override void Execute()
{
float e = AnimationCurveEvaluator.Evaluate(AnimationCurveType.OutQuad, effectProgressPercent);
noteVisual.noteMain.transform.localScale = e * Vector3.one;
}
public override void Adjust()
{
noteVisual.noteMain.transform.localScale = Vector3.one;
}
public override EffectBase_BM ConvertToBM()
{
return new Beatmap.DTMNoteGenerateExpand_BM(effectTime, generateTime);
}
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 DTMNoteGenerateExpand_BM : NoteGenerateEffect_BM
{
public float effectTime;
public float generateTime;
public DTMNoteGenerateExpand_BM()
{
}
public DTMNoteGenerateExpand_BM(float effectTime, float generateTime) :
base(effectTime, generateTime)
{
}
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
return new DTMNoteGenerateExpand(attachedGameElement as NoteVisualBase, generateTime, effectTime);
}
}
}
}

View File

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

View File

@@ -0,0 +1,89 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMNoteMissTransparent : NoteMissEffect
{
public List<Renderer> noteRenderers;
public DTMNoteMissTransparent(NoteVisualBase noteVisual, float effectTime)
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.effectTime = effectTime;
this.noteRenderers = new List<Renderer>();
foreach (Renderer renderer in noteVisual.notePartList.Select(part => part.GetComponent<Renderer>()))
{
noteRenderers.Add(renderer);
}
}
public override void Recover()
{
noteVisual.noteMain.SetActive(true);
foreach (var renderer in noteRenderers)
{
renderer.material.SetFloat("_MainAlpha", 1f);
}
}
public override void Execute()
{
float e = AnimationCurveEvaluator.Evaluate(AnimationCurveType.OutQuad, effectProgressPercent);
float alpha = (1 - e) / 4f;
foreach (var renderer in noteRenderers)
{
renderer.material.SetFloat("_MainAlpha", alpha);
}
}
public override void Adjust()
{
noteVisual.noteMain.SetActive(false);
foreach (var renderer in noteRenderers)
{
renderer.material.SetFloat("_MainAlpha", 0f);
}
}
public override EffectBase_BM ConvertToBM()
{
return new DTMNoteMissTransparent_BM(effectTime);
}
public override void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("DTM Note Miss Transparent");
var subcontainer = container.GenerateSubcontainer(3);
var effectTimeField = inspector.GenerateInputField(this, subcontainer, "Effect Time", nameof(effectTime));
}
}
namespace Beatmap
{
public class DTMNoteMissTransparent_BM : NoteMissEffect_BM
{
public DTMNoteMissTransparent_BM()
{
}
public DTMNoteMissTransparent_BM(float effectTime) : base(effectTime)
{
}
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
return new DTMNoteMissTransparent(attachedGameElement as NoteVisualBase, effectTime);
}
}
}
}

View File

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