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); } } } }